Regarding the Youtube API Blog they are experimenting with their new HTML5 Video Player.
Apparently to play a video in html5, you have to use the iframe embedding code :
<iframe class="youtube-player" type="text/html" width="640" height="385"
src="http://www.youtube.com/embed/VIDEO_ID" frameborder="0">
</iframe>
But if the client has not joined the HTML5 Trial, the player will automatically fall back into the flash player even if the client's browser is HTML5 video capable.
How to force the HTML5 video playback if the browser supports it, even if the users are not yet involved in the HTML5 Trial?
Otherwise how to disable the flash fallback?
EDIT:
It's possible to force HTML player through links to Youtube Video, but I need this kind of feature for embedded videos.
I've found the solution :
You have to add the
html5=1
in the src attribute of the iframe :The video will be displayed as HTML5 if available, or fallback into flash player.
If you're using the iframe embed api, you can put
html5:1
as one of theplayerVars
arguments, like so:Totally works.
Whether or not YouTube videos play in HTML5 format depends on the setting at https://www.youtube.com/html5, per browser. Chrome prefers HTML5 playback automatically, but even the latest Firefox and Internet Explorer still use Flash if it is installed on the machine.
The parameter html5=1 does not do anything (anymore) now. (Note it is not even listed at https://developers.google.com/youtube/player_parameters.)
I tried using the iframe embed code and the HTML5 player appeared, however, for some reason the iframe was completely breaking my site.
I messed around with the old object embed code and it works perfectly fine. So if you're having problems with the iframe here's the code i used:
hope this is useful for someone