A way to play video audio directly in a low-version Ie6/7/8 browser using HTML5 's audio and video tags

Source: Internet
Author: User

Excerpt from: Http://www.uiej.com/1107.html often people are accustomed to using SWF players to play network video audio

HTML5 has brought us a lot of surprises, with the new audio and video tags added to make it easier for us to play the audios and videos in our web pages. The video tag is good, but it can't be used in older versions of IE. So the general still use Flash Player to play the video, for example, the video code of the Youku station's insertion is as follows:

<embed src= "http://player.youku.com/player.php/sid/XNjgwMDU5MDU2/v.swf" allowfullscreen= "true" quality= "high" Width= "480" height= "align=" Middle "allowscriptaccess=" Always "type=" Application/x-shockwave-flash "></ Embed>

But what about having a good SWF player on hand? This site gives a good plug-in: http://html5media.info/

Html5media is a JavaScript class library that allows these two tags to be fully compatible with older versions of IE browsers.

Html5media is a very strong JavaScript class library that does not rely on any JavaScript framework. After using Html5media, when the browser does not support HTML5, it will automatically switch to flash mode flowplayer player . Although, there are many web players, but the processing code is not concise.

Use Html5media to enable IE6/7/8 browser to support HTML5 audio and video tags

1, first in the head section of the page to add the following script

<script src= "Http://api.html5media.info/1.1.6/html5media.min.js" ></script>

You can only load this JS script in the old version of IE by using the IE conditional annotation method.

2. Then you can add audio or video to it.

<!--video Media label--><video src= "Uiej.com.mp4" width= "" "height=" Controls preload></video><!-- Audio Media label--><audio src= "Uiej.com.mp3" Controls preload></audio>

This allows you to use the audio and video tags in IE8, even the old IE6 browser.

A way to play video audio directly in a low-version Ie6/7/8 browser using HTML5 's audio and video tags

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.