I'm trying to put a YouTube video source into the HTML5 <video>
tag, but it doesn't seem to work. After some Googling, I found out that HTML5 doesn't support YouTube video URLs as a source.
Can you use HTML5 to embed YouTube videos? If not, is there any workaround?
Step 1: add
&html5=True
to your favorite youtube urlStep 2: Find
<video/>
tag in sourceStep 3: Add
controls="controls"
to video tag:<video controls="controls"..../>
Example:
Note there seems to some
expire
stuff. I don't know how long thesrc
string will work.Still testing myself.
Edit (July 28, 2011): Note that this video src is specific to the browser you use to retrieve the page source. I think Youtube generates this HTML dynamically (at least currently) so in testing if I copy in Firefox this works in Firefox, but not Chrome, for example.