Some changes, clean code

This commit is contained in:
santic-zombie
2020-04-01 19:15:35 +03:00
parent d35971887c
commit 485716e10a
4 changed files with 4 additions and 26 deletions

View File

@@ -2,6 +2,8 @@ var stream_url = 'http://stream.santic-zombie.ru';
var audio = new Audio(stream_url);
audio.volume = 0.01;
var play = document.getElementById('play');
play.addEventListener('click', function() {
$("#myPlay").text("Now playing:");
@@ -14,19 +16,6 @@ pause.addEventListener('click', function() {
audio.pause();
}, 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(){
audio.volume = parseFloat(this.value / 10);
});

View File

@@ -36,7 +36,6 @@ function show()
MPDartist = array[0];
MPDsong = array[1];
MPDfile = array[2].replace(/^vk_kun\//,'').replace(/\.mp3/,'');
//console.log(MPDartist);
if (MPDartist == '' && MPDCurr != MPDfile) {
MPDartist = MPDfile.replace(/\s-.*/,'').replace(/^\s*/,'').replace(/\s*$/,'');