19

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>

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
Rishi Jogle
  • 277
  • 4
  • 6
  • 10

2 Answers2

8

There's no way to do this without Javascript. But the wonderful MediaElement.js library will work wonderfully for this purpose:

http://mediaelementjs.com

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.

Finwe
  • 6,372
  • 2
  • 29
  • 44
kinabalu
  • 428
  • 1
  • 5
  • 10
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