Commit 13706670 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Add Ended state.

parent 99c1a257
...@@ -342,7 +342,7 @@ function doState() ...@@ -342,7 +342,7 @@ function doState()
if( newState == 0 ) if( newState == 0 )
{ {
// current media has stopped // current media has stopped
onStop(); onEnd();
} }
else if( newState == 1 ) else if( newState == 1 )
{ {
...@@ -380,6 +380,11 @@ function doState() ...@@ -380,6 +380,11 @@ function doState()
onBackward(); onBackward();
} }
else if( newState == 8 ) else if( newState == 8 )
{
// current media has ended
onEnd();
}
else if( newState == 9 )
{ {
// current media encountered error // current media encountered error
onError(); onError();
...@@ -413,7 +418,7 @@ function monitor() ...@@ -413,7 +418,7 @@ function monitor()
if( newState == 0 ) if( newState == 0 )
{ {
// current media has stopped // current media has stopped
onStop(); onEnd();
} }
else if( newState == 1 ) else if( newState == 1 )
{ {
...@@ -451,6 +456,11 @@ function monitor() ...@@ -451,6 +456,11 @@ function monitor()
onBackward(); onBackward();
} }
else if( newState == 8 ) else if( newState == 8 )
{
// current media has ended
onEnd();
}
else if( newState == 9 )
{ {
// current media encountered error // current media encountered error
onError(); onError();
...@@ -602,6 +612,12 @@ function onBackward() ...@@ -602,6 +612,12 @@ function onBackward()
document.getElementById("state").innerHTML = "Backward playing..."; document.getElementById("state").innerHTML = "Backward playing...";
}; };
function onEnd()
{
document.getElementById("state").innerHTML = "End...";
};
var liveFeedText = new Array("Live", "((Live))", "(( Live ))", "(( Live ))"); var liveFeedText = new Array("Live", "((Live))", "(( Live ))", "(( Live ))");
var liveFeedRoll = 0; var liveFeedRoll = 0;
......
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