YouTube video in HTML5

后端 未结 5 506
既然无缘
既然无缘 2021-01-18 02:07

How do I play a YouTube video in HTML5?

相关标签:
5条回答
  • 2021-01-18 02:35

    http://html5demos.com/video#view-source is an example of how to use html5 to play a video.

    0 讨论(0)
  • 2021-01-18 02:42

    You can also take a look how YouTube does it, opt in at: http://www.youtube.com/html5

    0 讨论(0)
  • 2021-01-18 02:42

    If you're using safari, there's an YouTube5 extension that will make all youtube videos into html5 videos.

    http://www.verticalforest.com/2010/06/09/youtube5-html5-converter-for-youtube-videos/

    Supports videos that youtube does not (videos with ads etc)

    0 讨论(0)
  • 2021-01-18 02:46

    This is probably what you're looking for: Force HTML5 youtube video

    HTML5 video may play if the user has opted in:

    <iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/embed/VIDEO_ID" frameborder="0"> </iframe>
    

    HTML5-by-defualt video - notice the ?html5=1:

    <iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/embed/VIDEO_ID?html5=1" frameborder="0"> </iframe>
    

    The "HTML5" way of doing video would be to use a <video> tag. This post shows that it can be done, but it doesn't look like the best option. Show Youtube video source into HTML5 video tag?

    0 讨论(0)
  • 2021-01-18 02:59

    You can embed videos effortlessly by right clicking the video on youtube, copying the embed video option, and pasting it in your html where you want it to appear, The problem with this you wont have control over what is shown in the embed code apart from the clip you are interested in, ie, adverts playlists etc

    0 讨论(0)
提交回复
热议问题