From beddabadcd54ca5cac9f498fa4a931aac3a8e63e Mon Sep 17 00:00:00 2001 From: "M. Voerman" Date: Mon, 9 Feb 2015 22:55:13 +0100 Subject: bugfix, don't try to restart live stream when already playing recording --- javascript/main.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'javascript') diff --git a/javascript/main.js b/javascript/main.js index e797dc2..d8be2a4 100644 --- a/javascript/main.js +++ b/javascript/main.js @@ -3671,11 +3671,13 @@ if (DelisOK) { recList[currMed] = "\u0003" + recList[currMed].substring(1); medialist.style.opacity = 0; if (get_recordings == 1) { - setTimeout("GetMarks(); getResume(); playRec(recLink[currMed]+ '?mode=streamtoend&time=' + position);",100); + if (initialDelayPlayID != -1) { clearTimeout(initialDelayPlayID); initialDelayPlayID = -1; } + setTimeout("GetMarks(); getResume(); playRec(recLink[currMed]+ '?mode=streamtoend&time=' + position);",100); } else if (get_recordings == 2) { -// setTimeout("playRec(recLink[currMed]+ '?pos=resume');position = (mediaPlayer.getPosition()/1000);",100) - position = 0; - setTimeout("playRec(recLink[currMed]);",100) +// setTimeout("playRec(recLink[currMed]+ '?pos=resume');position = (mediaPlayer.getPosition()/1000);",100) + if (initialDelayPlayID != -1) { clearTimeout(initialDelayPlayID); initialDelayPlayID = -1; } + position = 0; + setTimeout("playRec(recLink[currMed]);",100) } } } -- cgit v1.2.3