Commit a1f445c3 authored by Daniel Amm's avatar Daniel Amm Committed by Jean-Baptiste Kempf

test pages: fix live media animation

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent f5913acb
......@@ -168,6 +168,12 @@ function handle_MediaPlayerTimeChanged(time)
// seekable media
info.innerHTML = formatTime(time)+"/"+formatTime(mediaLen);
}
else
{
// non-seekable "live" media
liveFeedRoll = liveFeedRoll & 3;
info.innerHTML = liveFeedText[liveFeedRoll++];
}
}
}
......@@ -456,8 +462,8 @@ function close()
<!--
var telxState = false;
var canPause = true;
var canSeek = true;
var canPause = false;
var canSeek = false;
function setPauseable(val)
{
......@@ -467,6 +473,8 @@ function setPauseable(val)
function setSeekable(val)
{
canSeek = val;
if( liveFeedRoll != 0 )
liveFeedRoll = 0;
}
function doSetSlider()
......@@ -802,6 +810,7 @@ function onOpen()
{
document.getElementById("state").innerHTML = "Opening...";
document.getElementById("PlayOrPause").value = "Pause";
setSeekable(false);
}
function onBuffer()
......@@ -820,9 +829,10 @@ function onPlay()
function onEnd()
{
document.getElementById("state").innerHTML = "End...";
setSeekable(false);
}
var liveFeedText = ["Live", "((Live))", "(( Live ))", "(( Live ))"];
var liveFeedText = ["Live", "((Live))", "(( Live ))", "((&nbsp; Live &nbsp;))"];
var liveFeedRoll = 0;
function onPlaying()
......@@ -857,6 +867,7 @@ function onStop()
document.getElementById("info").innerHTML = "-:--:--/-:--:--";
document.getElementById("state").innerHTML = "Stopped...";
document.getElementById("PlayOrPause").value = "Play";
setSeekable(false);
}
function onError()
......
......@@ -172,6 +172,12 @@ function handle_MediaPlayerTimeChanged(time)
// seekable media
info.innerHTML = formatTime(time)+"/"+formatTime(mediaLen);
}
else
{
// non-seekable "live" media
liveFeedRoll = liveFeedRoll & 3;
info.innerHTML = liveFeedText[liveFeedRoll++];
}
}
}
......@@ -430,6 +436,8 @@ function onOpen()
{
document.getElementById("state").innerHTML = "Opening...";
document.getElementById("PlayOrPause").value = "Pause";
if( liveFeedRoll != 0 )
liveFeedRoll = 0;
}
function onBuffer()
......@@ -450,7 +458,7 @@ function onEnd()
document.getElementById("state").innerHTML = "End...";
}
var liveFeedText = ["Live", "((Live))", "(( Live ))", "(( Live ))"];
var liveFeedText = ["Live", "((Live))", "(( Live ))", "((&nbsp; Live &nbsp;))"];
var liveFeedRoll = 0;
function onPlaying()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment