Is it possible to embed a YouTube video on your own website using HTML5, so it can be played on Safari on iPhone without Flash?
YouTube today announced it has finally stopped using Adobe Flash by default. The site now uses its HTML5 video player by default in Google's Chrome, Microsoft's IE11, Apple's Safari 8, and in beta versions of Mozilla's Firefox browser. At the same time, YouTube is now also defaulting to its HTML5 player on the web.
Playing a YouTube Video in HTML Take a note of the video id. Define an <iframe> element in your web page. Let the src attribute point to the video URL. Use the width and height attributes to specify the dimension of the player.
Embed a video or playlistOn a computer, go to the YouTube video or playlist you want to embed. From the list of Share options, click Embed. From the box that appears, copy the HTML code. Paste the code into your website HTML.
According to http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html:
<iframe src="http://www.youtube.com/embed/VIDEO_ID"></iframe>
That will play in HTML5 video (falling back on Flash when HTML5 video is unavailable).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With