diff options
author | M. Voerman <rekordc@gmail.com> | 2015-03-26 18:50:03 +0100 |
---|---|---|
committer | M. Voerman <rekordc@gmail.com> | 2015-03-26 18:50:03 +0100 |
commit | 69fb5a5f82418af920e6f0e71fc120d1af7023a3 (patch) | |
tree | 9c8c8369d790ed09a38416ae8e9c01f49d41ce98 /javascript | |
parent | 1a5b11467a6e3a1f8da65370568bf39105ed7253 (diff) | |
download | vdr-vipclient-69fb5a5f82418af920e6f0e71fc120d1af7023a3.tar.gz vdr-vipclient-69fb5a5f82418af920e6f0e71fc120d1af7023a3.tar.bz2 |
try restart after stream errors
Diffstat (limited to 'javascript')
-rw-r--r-- | javascript/main.js | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/javascript/main.js b/javascript/main.js index 95d4793..85023e5 100644 --- a/javascript/main.js +++ b/javascript/main.js @@ -3500,6 +3500,15 @@ function ShowSearchTimerInfo() { // MPD Section function MPD(ev) { +// ev.state : +// STATE_IDLE = 0 +// STATE_CONNECTING = 1 +// STATE_PAUSED = 2 +// STATE_PLAYING = 3 +// STATE_FASTFORWARDING = 4 +// STATE_REWINDING = 5 +// STATE_FAILED = 6 + // alert("Media player state changed: " + ev); // alert("Media player state changed: state=" + ev.state + ", reason=" + ev.reason + ", code=" + ev.code); // alert("Media player error :" + mediaPlayer.getError().details); @@ -3514,7 +3523,6 @@ if (MPDListener == 0) { initialDelayPlayID = setTimeout("mediaPlayer.close();mediaPlayer.open(URL);mediaPlayer.play(1000);GetEPG(currChan);ExtraStuff();",TryingInterval); } else { ErrorAgain = 0; - //alert("Media player state changed: state=" + ev.state + ", reason=" + ev.reason + ", code=" + ev.code); showDisplay("ERRR", false, 100, 0 ); if (experimental) { settimer(0,ev.reason,0,2,color_error); @@ -3522,8 +3530,13 @@ if (MPDListener == 0) { settimer(0,Lang[67],0,2,color_error); } } - } else if ( ev.state == 2 && ev.reason == "PositionEnd" && PromoChannel) { - if (currChan == PromoChannelNR) { play(channels[PromoChannelNR]);} + } else if ( ev.state == 2 && ev.reason == "PositionEnd") { + if (PromoChannel && currChan == PromoChannelNR) { + play(channels[PromoChannelNR]); + } else { + settimer(0,Lang[63],0,2,color_error); + initialDelayPlayID = setTimeout("mediaPlayer.close();mediaPlayer.open(URL);mediaPlayer.play(1000);GetEPG(currChan);ExtraStuff();",TryingInterval); + } } } else { if ( ev.state == 6 && ev.reason == "HostUnreachable" ) { |