tags:

views:

42

answers:

1

Is there any way to control YOU TUBE EMBED CODE. For example i am using you tube embed code in my site. is there any way to control the video like forward, backward, stop etc with my own buttons.

Is this possible?

Any help will be appreciated.. Thanks in Advance.

Fero

A: 

All of the major browser-embedded video player types have ways to do this, but the method is different for all of them.

YouTube uses a Flash player, which poses a special problem: Flash video players have no ability to handle external JavaScript calls other than what is specifically added by the programmer that built the player. That is, if YouTube didn't build their player with support for external scriptability, you can't script it. This isn't a flag -- on/off -- it's that Flash makes you explicitly publish an external scripting API, and you have to know what the calls look like to make the player do what you want. This is unlike, say, QuickTime, Windows Media Player, or the new HTML 5 <video> tag, all of which have documented basic playback control like you're asking about.

It's probably possible to build your own FLV player (or buy one, like the popular JW Player, which does have a JavaScript API) and point it at the actual video file served by YouTube. I don't know if they try to obscure the video file URL, but once you find out what it is, you're golden.

Warren Young
So end result is there is NO WAY to control the options with my own buttons and to buy or build own FLV player.. Am i right young..
Fero
No, you have several options: 1. Find out what scriptability is built into the YouTube player, if any; 2. If that player cannot be scripted, you could build your own. You can probably do this with the free Flex SDK, though it would be easier with Flash Builder or Flash Professional; or 3. You can buy a Flash player that has the features you want already.
Warren Young