-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
121 lines (99 loc) · 3.68 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
115
116
117
118
119
120
121
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap Import -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<!--Font Awesome Import-->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head>
<style>
html,body
{
width: 100%;
height: 100%;
margin: 0px;
padding: 0px;
overflow-x: hidden;
background-color: #E4E4E4;
}
.slider {
-webkit-appearance: none;
width: 75%;
height: 15px;
border-radius: 5px;
background: #d3d3d3;
outline: none;
opacity: 0.7;
-webkit-transition: .2s;
transition: opacity .2s;
}
.slider:hover {
opacity: 1;
}
.slider::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 25px;
height: 25px;
border-radius: 50%;
background: darkturquoise;
cursor: pointer;
}
.slider::-moz-range-thumb {
width: 25px;
height: 25px;
border-radius: 50%;
background: darkturquoise;
cursor: pointer;
}
i {
position: absolute; top:35%; bottom: 50%; font-size: 15em; color: black; cursor: pointer
}
/*Media Query for iPhone 4*/
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) and (-webkit-device-pixel-ratio: 2) and (device-aspect-ratio: 2/3)
{
i {
font-size: 10em;
top: 45%;
}
}
</style>
<script>
var src = "http://209.95.56.101:9016/stream?nocache="
//var win = window.open("", "Title", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=300,height=50,top="+(screen.height-400)+",left="+(screen.width-840));
var on_play_callback = function() {
var audio = document.getElementById("player");
audio.src = src + Math.floor( Math.random() * 1000);
audio.load();
audio.play();
};
function toggle_play() {
var audio = document.getElementById('player');
if(audio.paused) {
document.getElementById('pbutton').className = "";
document.getElementById('pbutton').className = "far fa-pause-circle playing";
on_play_callback();
} else {
document.getElementById('pbutton').className = "";
document.getElementById('pbutton').className = "far fa-play-circle paused";
audio.pause();
}
}
function setVolume(i) {
document.getElementById("player").volume = i;
}
</script>
<!--html code-->
<audio id="player" src="http://209.95.56.101:9004/;stream.mp3"></audio>
<div class="row justify-content-center">
<img src="http://www.wbrs.org/wp-content/uploads/2018/09/wbrsLogo.png" class="img-responsive" style="height: 200px; max-width: 75%; padding-top: 15px;">
</div>
<div class="row justify-content-center">
<i class="far fa-play-circle paused" id="pbutton" onclick="toggle_play()"></i>
</div>
<div class="row justify-content-center slidecontainer">
<input type="range" min="0" max="1" value="1" class="slider" step ="0.01" id="volume-bar" style="position: absolute; bottom: 10%;"oninput="setVolume(this.value)">
</div>
</html>