For a WordPress site I am working on, there is a jquery slider (based on the coda slider) where videos are presented. All of the videos are from Vimeo. If a video is playing and someone slides to the next video, the other video continues to play. I have found some API code from Vimeo that allows me to control the video, so i could possibly add a "pause" class to the slider buttons that will pause videos when someone slides to the next video.
However; in order for this to work, I need an id added to the iframe tag, and this line of code to the end of the video player url:
?api=1&player_id=player_1 (except player_1 should be a unique id)
So the final output should look like this (except player_id number will be unique on each video):
<iframe id="player_1" src="http://player.vimeo.com/video/27421766?api=1&player_id=player_1" width="670" height="377" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe>
I wonder if there is a function I can create that will do this. I know there are some core files in WordPress where the embed code lives, but am hestitant to mess with that.