I am implementing site where i required to embed youtube videos into tag in HTML5.
can you tell me how should i embedd into this without using <iframe>
Asked
Active
Viewed 6.5k times
19

SLaks
- 868,454
- 176
- 1,908
- 1,964

Rishi Jogle
- 277
- 4
- 6
- 10
-
Have you looked at the documentation? https://developers.google.com/youtube/js_api_reference – Allan Kimmer Jensen Nov 01 '12 at 12:49
-
2Have a look at this question: http://stackoverflow.com/questions/5157377/show-youtube-video-source-into-html5-video-tag – Michael Schmidt Nov 01 '12 at 12:52
2 Answers
8
There's no way to do this without Javascript. But the wonderful MediaElement.js library will work wonderfully for this purpose:
The example above shows using a YouTube video with a <video>
tag, but also has a fallback to Flash for browsers that don't support it.
6
You can't extract the source of the video without violating YouTube's terms of service. The only supported way to embed a video in a web page is using the iframe embed.

Greg Schechter
- 2,291
- 15
- 16