YouTube video in HTML5
19,810
Solution 1
This is probably what you're looking for: Force HTML5 youtube video
HTML5 video may play if the user has opted in:
<iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/embed/VIDEO_ID" frameborder="0"> </iframe>
HTML5-by-defualt video - notice the ?html5=1
:
<iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/embed/VIDEO_ID?html5=1" frameborder="0"> </iframe>
The "HTML5" way of doing video would be to use a <video>
tag. This post shows that it can be done, but it doesn't look like the best option. Show Youtube video source into HTML5 video tag?
Solution 2
You can also take a look how YouTube does it, opt in at: http://www.youtube.com/html5
Related videos on Youtube
Author by
Tricia Fish
Updated on May 01, 2022Comments
-
Tricia Fish almost 2 years
How do I play a YouTube video in HTML5?
-
Haim Evgi over 13 years
-
-
Hofi over 9 yearsjust for those who are lazzy to look into the source, from the form of the page mentioned above, clicking on the switcher button, it posts enable_html5=true for enabling and disable_html5=true for disabling the html5 default player