To all, once again, I ask for help.
I'm using a firefox with MPlayer Plugin
What I want is to send an alert to the end of a video played, ie if the video player is inactive (stopped) emit alert()
or if it is active (running) the function continues checking with method setInterval()
.
What I have done so far since the question asked:
<script>
<!--
var obj = document.embeds[0];
function Stop(){
obj.Stop(); alert('Tempo de Preview, terminado.');
}
window.onload = function(){setTimeout('Stop()', 10*1000);}
-->
</script>
Let's say I got a breakthrough, but what I have right now is a code that previews the video for 10 seconds and that's it!
But the intention is to identify if the video has come to an end, if it has come then to issue a alert()
, otherwise it keeps checking if the video in <embed/>
is stopped or not.
This dialog
alert()
is just to illustrate the example of what I want.
In order to do this, it is necessary to check the method setInterval()
from time to time, I have not yet been able to formulate a routine that captures this property > native Stop()