flowplayer-a free web video player

Source: Internet
Author: User

FlowPlayer supports the playback of FLV, SWF and other streaming media as well as picture files, which can play video files very smoothly and support custom configuration and extension. 1. Load flowplayer.js add flowplayer.js between the head of the page where you want to play the video. <script type= "Text/javascript" src= "Js/flowplayer-3.2.6.min.js" ></script> you can download the latest version from the Flowplyer official website: http ://FLOWPLAYER.ORG/DOWNLOAD/INDEX.HTML2, XHTML Add the following code where you want to join the player: <a href= "flowplayer.flv" style= "Display:block ; width:520px;height:330px "id=" player ></a> points the href attribute of the A tag to the video address to play, then sets the style, width and height, and sets the Display:block, Of course, the key is to assign an ID to the a tag so that it can be called by JS. Of course you can also only specify a div in HTML, and then the JavaScript to control the playback address, such as: <div id= "Player2" style= "width:520px; height:330px "> </div> 3, JavaScript at the bottom of the page is counted into the JavaScript script call player: <script type=" Text/javascript "> FlowPlayer ("Player", "flowplayer-3.2.7.swf"); </script> using the FlowPlayer () function to call the player, the first parameter is the player ID, the second parameter is the path of the player, it is a flash file, make sure that the path of the player is correct. If you do not call the video file using the a tag, but instead use a div to invoke it, the code is as follows: FlowPlayer ("Player2", "flowplayer-3.2.7.swf", {clip: {URL: "Flow Player.flv ", Autoplay:false, autobuffering:true});The third argument to the FlowPlayer () function is that you can set multiple settings, which is the advanced one. The URL in the Clip method: represents the real address of the video file, AutoPlay: Indicates whether to play automatically, the default is true,autobuffering: Indicates whether to automatically buffer, that is, when the video file is set to not automatically play, the player still pre-download the contents of the video file.

 

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.