Some changes, clean code
This commit is contained in:
@@ -1,11 +1,5 @@
|
|||||||
body {
|
body {
|
||||||
background-color: rgb(62, 50, 64);
|
background-color: rgb(62, 50, 64);
|
||||||
/*
|
|
||||||
background-image: url("/pic/bg.jpg");
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-attachment: fixed;
|
|
||||||
background-position: center center;
|
|
||||||
background-size: cover; */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.parent {
|
.parent {
|
||||||
@@ -20,8 +14,6 @@ body {
|
|||||||
align-content: center;
|
align-content: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#song{
|
#song{
|
||||||
|
|||||||
@@ -44,11 +44,9 @@
|
|||||||
<div>
|
<div>
|
||||||
vol:
|
vol:
|
||||||
<br>
|
<br>
|
||||||
<input id="volume" type="range" min="0" max="10" value="5" step="0.1" />
|
<input id="volume" type="range" min="0" max="10" value="2" step="0.1" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <span id="duration"></span> -->
|
|
||||||
<br>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
15
js/audio.js
15
js/audio.js
@@ -2,6 +2,8 @@ var stream_url = 'http://stream.santic-zombie.ru';
|
|||||||
|
|
||||||
var audio = new Audio(stream_url);
|
var audio = new Audio(stream_url);
|
||||||
|
|
||||||
|
audio.volume = 0.01;
|
||||||
|
|
||||||
var play = document.getElementById('play');
|
var play = document.getElementById('play');
|
||||||
play.addEventListener('click', function() {
|
play.addEventListener('click', function() {
|
||||||
$("#myPlay").text("Now playing:");
|
$("#myPlay").text("Now playing:");
|
||||||
@@ -14,19 +16,6 @@ pause.addEventListener('click', function() {
|
|||||||
audio.pause();
|
audio.pause();
|
||||||
}, false);
|
}, false);
|
||||||
|
|
||||||
/*
|
|
||||||
audio.addEventListener("timeupdate", function() {
|
|
||||||
var duration = document.getElementById('duration');
|
|
||||||
var s = parseInt(audio.currentTime % 60);
|
|
||||||
var m = parseInt((audio.currentTime / 60) % 60);
|
|
||||||
var h = parseInt((audio.currentTime / 3600) % 60);
|
|
||||||
if (s < 10) s = '0' + s;
|
|
||||||
if (m < 10) m = '0' + m;
|
|
||||||
if (h < 10) h = '0' + h;
|
|
||||||
duration.innerHTML = h + ':' + m + ':' + s;
|
|
||||||
}, false);
|
|
||||||
*/
|
|
||||||
|
|
||||||
$("#volume").mousemove(function(){
|
$("#volume").mousemove(function(){
|
||||||
audio.volume = parseFloat(this.value / 10);
|
audio.volume = parseFloat(this.value / 10);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ function show()
|
|||||||
MPDartist = array[0];
|
MPDartist = array[0];
|
||||||
MPDsong = array[1];
|
MPDsong = array[1];
|
||||||
MPDfile = array[2].replace(/^vk_kun\//,'').replace(/\.mp3/,'');
|
MPDfile = array[2].replace(/^vk_kun\//,'').replace(/\.mp3/,'');
|
||||||
//console.log(MPDartist);
|
|
||||||
|
|
||||||
if (MPDartist == '' && MPDCurr != MPDfile) {
|
if (MPDartist == '' && MPDCurr != MPDfile) {
|
||||||
MPDartist = MPDfile.replace(/\s-.*/,'').replace(/^\s*/,'').replace(/\s*$/,'');
|
MPDartist = MPDfile.replace(/\s-.*/,'').replace(/^\s*/,'').replace(/\s*$/,'');
|
||||||
|
|||||||
Reference in New Issue
Block a user