Better Play Video plugin Swfobject.js

Source: Internet
Author: User

How to play the video:

Method One, use HTML5 to play


<video src= "./files/clip_480_5sec_6mbps_h264.mp4" width= "1000px" height= "400px" controls= "Controls" loop= "loop" autoplay= "AutoPlay" poster= "Images/zzsm.png" style= "border:1px solid red;" >your Browser does not support the video.</video>

Poster is used to set the cover map of the video,

Loop is looped back

AutoPlay whether to play automatically

Controls whether the control button is displayed

Cons: Not very good compatibility

Method two: Using Video plugin Swfobject.js

Download the required files first, in demo.html

<!--video_1 part--
<div class= "Video_1" id= "A1" >
<!---->
</div>
<script type= "Text/javascript" src= "Js/swfobjects.js" ></script>
<script type= "Text/javascript" >
var v = new SWFObject ("files/flvplayer.swf", "single", "1100", "550", "1");
V.addparam ("allowFullScreen", "true"); Allows the video to be filled with a limited width and height *
V.addparam ("wmode", "Transparent"); You can set the video to not the highest level and the other layers can cover the video *
V.addvariable (' volume ', ' 40 ');
V.addvariable ("Autostart", ' false ');
V.addvariable ("Overstretch", "true");
V.addvariable ("File", "files/11.flv");//video path
V.addvariable ("image", "images/banner1.jpg");//set Video cover Map
V.write ("A1");
</script>
<!--end of Video_1 part--

Effects such as:

Better Play Video plugin Swfobject.js

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.