0

I have some videos in a site, which has music playing in the background.

Once I start a Video, I want the Music to stop automatically. Not a big deal when I use a javscript based HTML5 Video plugin.

However, there is a flash fallback (flowplayer). And now I have no idea how to find out (from a javascript point of view) when the flowplayer is clicked. Is there a way to catch this event via javascript? Can I somehow find out, if the div containing the flowplayer is being clicked, even though the player sits on top?

Is there a JQuery way of doing this?

sebastian
  • 16,470
  • 1
  • 22
  • 18

2 Answers2

3

Flowplayer features a javascript API and triggers the onStart event at the moment you start playing the video. You'll find more information here: http://flowplayer.org/documentation/events/clip.html

Simon
  • 3,509
  • 18
  • 21
1

You can start by investigating if the <embed> tag or <object> supports click events. This should be possible. You can also assign an id to the tag and trigger it from there.

This SO question might give you ideas.

Community
  • 1
  • 1
erickb
  • 6,193
  • 4
  • 24
  • 19
  • I tried all kinds of events on object, but it won't do it. Flash movie is transparent, but no matter what I do, I either can't start the Video, or can't get an event ;) Thanks for your answer, though, to be honest I still wonder, why it won't work like this ;) – sebastian Feb 23 '11 at 12:32