diff options
Diffstat (limited to 'client/js')
-rw-r--r-- | client/js/radio_emulator.js | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/client/js/radio_emulator.js b/client/js/radio_emulator.js index 3e1e03b..4e0a885 100644 --- a/client/js/radio_emulator.js +++ b/client/js/radio_emulator.js @@ -187,7 +187,8 @@ function loadShowCallback(json, params) // } // }, {passive: true}); audioElement.addEventListener('ended', function(){ - location.reload(); + FetchJSON(`${listRequest}`, hashCallback, [ new Date().getTime() ]); + // location.reload(); }); // audioElement.addEventListener('complete', ()=>{ // debugLog("Download completed!") @@ -217,8 +218,17 @@ function sync_radio() audioElement.currentTime = new_now; audioElement.play(); audioElement.muted = false; - for ( av = 0.1; av === 1; av = av+0.1 ) - audioElement.volume = 0.1; + audioElement.volume = 0; + debugLog(Date.now()) + debugLog(Date.now()) + debugLog(Date.now()) + debugLog(Date.now()) + debugLog(Date.now()) + setTimeout( audioElement.volume += 0.2, 500); + setTimeout( audioElement.volume += 0.2, 1000); + setTimeout( audioElement.volume += 0.2, 1500); + setTimeout( audioElement.volume += 0.2, 2000); + setTimeout( audioElement.volume += 0.2, 2500); return new_now; } return 0; |