aboutsummaryrefslogtreecommitdiff
path: root/client/js/radio_emulator.js
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-10-13 21:17:43 +0300
committerkaotisk <kaotisk@arching-kaos.org>2024-10-13 21:17:43 +0300
commit90d9f777edee8d93f1a9b452a47943a1a60fee3c (patch)
tree784e67c6ca07d7f857a1e7fdcc1a91c5f7f0f6d3 /client/js/radio_emulator.js
parent709d88f16cb99da3cc2c4bb9efef78f09bab25dc (diff)
downloadarching-kaos-radio-90d9f777edee8d93f1a9b452a47943a1a60fee3c.tar.gz
arching-kaos-radio-90d9f777edee8d93f1a9b452a47943a1a60fee3c.tar.bz2
arching-kaos-radio-90d9f777edee8d93f1a9b452a47943a1a60fee3c.zip
Stopped reloading the page
Diffstat (limited to 'client/js/radio_emulator.js')
-rw-r--r--client/js/radio_emulator.js16
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;