-8

Possible Duplicate:
Stop a Vimeo Video with Jquery

I have a video embedded into the hero section of my site, streaming from my vimeo account. I'm trying create a Jquery stop function to my embedded video, Therefore when the user clicks on any of the links on my site the hero video stops playing. Is there a way this can be done?

click here

Community
  • 1
  • 1
  • 2
    You're stating vimeo in the post and YouTube in the headline? – m90 Mar 13 '12 at 11:09
  • Possible duplicates : http://stackoverflow.com/questions/3688275/stop-a-vimeo-video-with-jquery, also http://stackoverflow.com/questions/6145990/how-to-stop-a-vimeo-video-with-jquery – Lix Mar 13 '12 at 11:11

2 Answers2

0

Since your linked site uses vimeo, I'll direct you here: http://vimeo.com/api/docs/player-js

A stop (pause) is as simple as:

document.getElementById('myViddy').pause(); //for <object>-style embed

and

document.getElementById('myIFrame').postMethod({"method": "pause"}); //for <iframe>-style embed
m90
  • 11,434
  • 13
  • 62
  • 112
0

Try looking into the vimeo javascript API, it allows you to control what the player does: http://vimeo.com/api/docs/player-js Look at this page for an working example of controlling the vimeo player through javascript: http://player.vimeo.com/playground

Edit: My bad, was a minute too late while struggling with the captcha.

David Mulder
  • 26,123
  • 9
  • 51
  • 114