Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Embed a YouTube video in HTML5 without Flash

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?

like image 445
Aximili Avatar asked Oct 12 '10 23:10

Aximili


People also ask

Does YouTube use Flash Player or HTML5?

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.

How do you link a YouTube video in HTML5?

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.

Can you embed a YouTube video in HTML?

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.


1 Answers

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).

like image 175
Delan Azabani Avatar answered Sep 17 '22 12:09

Delan Azabani