-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
115 lines (86 loc) · 3.31 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, minimum-scale=1">
<meta name="theme-color" content="#2b3a42">
<meta property="og:title" content="Listen to Doing What Matters in Times of Stress by WHO" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://wom.fm/110/" />
<meta property="og:image" content="https://wom.fm/resources/OG_WOM.png" />
<meta name="twitter:card" content="summary_large_image">
<script type="text/javascript" src="./resources/app.js"></script>
<link rel="stylesheet" type="text/css" href="./resources/style.css" />
</head>
<body>
<script id="rendered-js" type="text/javascript" src="./audio.js"></script>
<header> </header>
<div id="amplitude-player">
<div class="time-container" dir="ltr"> <span class="current-time">
<span class="amplitude-current-time" amplitude-main-current-time="true"></span> </span>
<progress class="amplitude-song-played-progress" id="song-played-progress" amplitude-main-song-played-progress="true"></progress> <span class="duration">
<span class="amplitude-duration-time" amplitude-main-duration-time="true"></span> </span>
</div>
<div id="amplitude-left">
<div id="player-left-bottom">
<div id="meta-container"> <span amplitude-song-info="name" id="song-name" amplitude-main-song-info="true"></span> </div>
<div id="control-container">
<div id="central-control-container">
<div id="central-controls">
<div id="prev-container">
<div class="amplitude-prev" id="previous"></div>
</div>
<div id="play-pause-container">
<div class="amplitude-play-pause" amplitude-main-play-pause="true" id="play-pause"></div>
</div>
<div id="next-container">
<div class="amplitude-next" id="next"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="source">
Source: <a id="link2source" href="" title="Source for this audio"><span class="source" amplitude-song-info="source" amplitude-main-song-info="true"></span></a>
<script>
document.getElementById('link2source').onclick=function() {
var sourcelink = Amplitude.getActiveSongMetadata().source_url;
window.open(sourcelink);
};
</script>
</div>
</div>
</body>
<script id="rendered-js" type="text/javascript" src="./audio.js"></script>
<script>
function download(file) {
window.location = file;
}
</script>
<script language="JavaScript">
window.onkeydown = function(e) {
return !(e.keyCode == 32);
};
/*
Handles a click on the song played progress bar.
*/
document.getElementById('song-played-progress').addEventListener('click', function(e) {
var offset = this.getBoundingClientRect();
var x = e.pageX - offset.left;
Amplitude.setSongPlayedPercentage((parseFloat(x) / parseFloat(this.offsetWidth)) * 100);
});
</script>
<script language="JavaScript">
var audiotitle = Amplitude.getActiveSongMetadata().name;
var audiourl = window.location.href;
openShare = async() => {
if(navigator.share) {
navigator.share({
title: audiotitle,
url: audiourl,
}).then(() => console.log('Successful share')).catch((error) => console.log('Error sharing', error));
}
};
</script>
</html>