views:

65

answers:

2

I am embedding a movie in a web page with the embed tag, but I would like to interact and be interacted via javascript with the embedded movie in .mov. In particular, I would like to get the timings so I can perform actions on the web pages when a particular moment in the movie is reached (like adding subtitles or karaoke effects in the page as the movie plays).

Is this possible with standard HTML 4 and javascript, or do I need flash or maybe html 5 ?

+1  A: 

You most certainly can do this, I've done this with MOVs on a major project. Refer to this page for all you need to know.

Cirrostratus
it is a mov video included with the embed tag.
Marcella
@Cirrostratus use comments to ask such clarifications.
Amarghosh
I knew I should, however I've never seen how to comment on the question. I can see the comment link for answers, but not the question.
Cirrostratus
You will start seeing those from now onwards. You need to have 50 reputation points to comment on others' posts http://stackoverflow.com/faq Btw, why did you make this community wiki?
Amarghosh
I make it a wiki initially in a lame attempt at trying to figure out how to comment on the question :)At the time, I wasn't aware of the 50-pt rule
Cirrostratus
+1  A: 

Applies only to embedded flash content - post was made before OP clarified that he was using mov files.


Yes it is - provided you have access to the source code of the flash movie. Interaction between Flash movie and the javascript is done through ExternalInterface - check out the call() and addCallback() methods in that page.

As for getting the timings, you can use playheadTime property of the video player control. You might also want to check out the cue points - FLV player dispatches cuePoint events when the play head reaches cue points set at the time of creating the FLV.

You can Listen to these events and call appropriate javascript functions using ExternalInterface.

Amarghosh
it is a .mov file embedded with the embed tag, it is not flash. it gets visualized through quicktime on my mac, and I assume there can be cross-platform issues to consider
Marcella