Web video playback "HTML5 video Tag"

Source: Internet
Author: User

I. Description

Video tags are introduced in HTML5 to facilitate the playback of videos in the browser without the need to rely on flashplayer to be more lightweight. However, there are some issues to be aware of in terms of browser compatibility and video protocol support.

second, browser-compatible

HTML5 video tags are now supported by ie9+ and other mainstream browsers .

For IE8 and below the IE browser, you can consider introducing HTML5 extension support JS to try to solve, not pro-test.

third, video protocol support

Support: Ogg, MPEG4, WebM
Not supported: rtmp, RTSP (if transcoding, cut into HLS can be played, but even within the LAN also has about 3 seconds of delay)

Note: More detailed video format support would like to have informed friends to inform, thank you!

Four, DEMO

More properties, methods, and events refer to the list of APIs in this article's resources.

<!--define a video tag: AutoPlay: Auto-play; controls: Display the control;    SRC: Specify the video source; Width,height: Set the display size of the video;<VideoId="My_video"AutoPlayControlsSrc="Https://media.w3.org/2010/05/sintel/trailer.mp4"Width="500"height= "$" ></video> <script type=  "Text/javascript" > //get video objects Span class= "Hljs-keyword" >var Myvideo=document.getelementbyid ( "My_video"); //play video function  Play () {myvideo.play ();} //pause video function pause () {myvideo.pause ();} </SCRIPT>         
v. References
    1. HTML5 Video verbose api:https://msdn.microsoft.com/zh-cn/library/hh772500 (v=vs.85). aspx
    2. HTML5 Video Detail function demo:http://www.w3.org/2010/05/video/mediaevents.html

Web video playback "HTML5 video Tag"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.