JavaScript to test the state of a movie?

J

Jill E

Does anyone know where I could find, or what the JavaScript would look like
to test the state of a movie?

I am creating an automated presentation to be viewed in a browser. If the
user stops the movie, I want to be able to detect this and then pause the
presentation. Right now I have a JavaScript that moves to a new page in a
prescribed number of seconds (based on the length of the movie). However, if
the movie is stopped, the user is still moved to the next page.

I know I should move to the next page when the movie is finished but I don't
know what the script would look like.

Any ideas?

Jill
 
H

Hywel Jenkins

Does anyone know where I could find, or what the JavaScript would look like
to test the state of a movie?

I am creating an automated presentation to be viewed in a browser. If the
user stops the movie, I want to be able to detect this and then pause the
presentation. Right now I have a JavaScript that moves to a new page in a
prescribed number of seconds (based on the length of the movie). However, if
the movie is stopped, the user is still moved to the next page.

I know I should move to the next page when the movie is finished but I don't
know what the script would look like.

Any ideas?

Embed the movie in a Flash animation that does the page load for you.
And smaller elephants that we can keep as pets. Those are my two ideas.
 
T

Travis Newbury

Jill said:
Does anyone know where I could find, or what the JavaScript would look like
to test the state of a movie?

Assuming you are using IE or netscape 7 (the only browsers that this
will work on)
This will let you synchronize the slides to the movie regardless of the
position (which means you can rewind etc...) This is off the top of my
head, but you can look it up to correct syntax errors and stuff

In the head

function CheckMovie(){
var PositionHolder = MovieID.getposition();
if (PositionHolder > 1){
MyImage.src = "Image to appear 1 second into the movie"
return;
}
if (PositionHolder > 10){
MyImage.src = "Image to appear 10 seconds into the movie"
return;
}
if (PositionHolder > 90){
MyImage.src = "Image to appear 90 seconds into the movie"
return;
}
setTimeout("CheckMovie();", 1000);
}

In the body
<script>CheckMovie()</script>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,830
Latest member
ZADIva7383

Latest Threads

Top