From b7e9fb47bd8c2f4329987b29bd2fbe87b3748e06 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Tue, 12 Nov 2024 02:55:59 +0200 Subject: Press Sync to start --- client/js/radio_emulator.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client/js') diff --git a/client/js/radio_emulator.js b/client/js/radio_emulator.js index 19a8719..a73be16 100644 --- a/client/js/radio_emulator.js +++ b/client/js/radio_emulator.js @@ -144,7 +144,7 @@ function FetchAudio(url, callback) placeholders.dlProgress.value = 100; audioElement.src = URL.createObjectURL(request.response); callback(); - // audioElement.play(); + audioElement.play(); debugLog("Tried... did it work?"); } else { debugLog(`ERROR ${request.status} while loading ${url}`); @@ -233,6 +233,7 @@ function fadeInAudio() function sync_radio() { + FetchJSON(`${listRequest}`, hashCallback, [ new Date().getTime() ]); var new_now = values.current_time + getSecondsHere(); debugLog("Trying to sync @ "+ values.current_time + " + " + getSecondsHere() + " = " + new_now); audioElement.currentTime = new_now; @@ -370,6 +371,5 @@ function hashCallback(json, params) FetchJSON(`${jsonRequest}${json.latest_list}`, listCallback, [now, json.latest_list]); } -FetchJSON(`${listRequest}`, hashCallback, [ new Date().getTime() ]); // @license-end -- cgit v1.2.3