How to use JW player to play flash and hide the control button and customize the JS that is executed after the play is completed

Source: Internet
Author: User

Flash play in a customer project needs to be customized, such as do not show the control button, flash playback after the completion of specific JS, etc., after using more than n jqery plug-ins and players, the final JW player plugin can meet my above requirements becausethe JW player plugin was sent to me by a colleague (version:jwplayer6.6 is not the latest version), when the control button is hidden, according to the parameters set on the official network after the altogether invalid finally after groping to find the reason is the latest version of the official website is version 6.10, and I use the 6.6 version so no matter how I configure it is not valid(some parameters are not supported in older versions)Find the reason that is simple, on the official website download the latest player and JS file (download need to register) and configured to fully hide the control button, but the Flash Player on the top right shows the Jwplay logo and URL, it is obviously impossible to display the information of other companies on the customer's project, So the player changed the version of 6.6 after the perfect solution to the problem, in this record want to help the need for friends, I with colleagues two plus about two days before the work of the player I use isBroken * After the6.6 version, free version of the website has logo, different version pricingSee official website:http://www.jwplayer.com/pricing/
<!--htl Add 2014-10-31 < -</--><!DOCTYPE HTML Public "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/TR/xhtml1/DTD/ Xhtml1-transitional.dtd "><HTMLxmlns= "http://www.w3.org/1999/xhtml"><Head>  <title>jwplay6.10 Use-Hide the control button and after the video has finished playing JS event</title>  <Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8" />  <Scripttype= "Text/javascript"class= "Library"src= "Http://libs.baidu.com/jquery/1.9.0/jquery.min.js"></Script></Head><Body>  <DivID= "Video">    <DivID= "Sp_box"></Div>  </Div></Body>  <!--online JS provided by Jwpsrv.com -  <Scriptsrc= "Http://jwpsrv.com/library/0cnCVGMOEeSQmA6sC0aurw.js"></Script>  <Scripttype= "Text/javascript">   varPlayer; //when the page loads$ (document). Ready (function() {loadingjwplayer (); //Video Start playback eventPlayer.onplay (function() {Console.log ("start playing video"); //set the player background color, default is black, but our video is white background, cannot change here, I can only be resolved by changing the source code (jwplayer.js "#000000" to "#ffffff")JQuery ("#sp_box"). CSS ('bgcolor','#ffffff');                }); //Video Playback Complete eventPlayer.onplaylistcomplete (function() {Console.log ("Load Complay"); Alert ("Hello, the video is finished! ");      });    }); //Netfox-htl edit 2014-11-03 load player and set related parameters    //jwplayer Document Address: Http://www.longtailvideo.com/support/open-video-ads/13048/ova-configuration-guide  functionLoadingjwplayer () {Player=Jwplayer ('Sp_box'). Setup ({//Flash Display effect, None,fill,exactfit,uniform, default to uniform with black border          //Reference: Http://support.jwplayer.com/customer/portal/articles/1413113-configuration-options-reference#otherStretching:'Fill', Autostart:true,//Auto PlayCONTROLS:false,//Display control buttons          //OVA for JW5 only:turn on playlist control-enables the next/previous controlbar buttons and load the entire Playlis T into the player in one go.Allowplaylistcontrol:false,          //OVA for JWx only:specifies whether or not overlays and ad notices is to being repositioned based on whether or not the Control bar shows and hides.assesscontrolbarstate:false, Width:jquery (document). Width (),//Video Widthheight:jquery (document). Height (),//Video HighFile:"Http://videos-jp.jwpsrv.com/zWLy8Jer/videos/i8oQD9zd-1753142.mp4? 77c801d752d5207784c49e7ed80fb953798fae0fcca03ecf79558496a374b6096b35a35d4d31c99192f10fb8e9b9c158204e6312da47541f86c39eb61 19edf45a6f6b4a92a2cb9b13f25fdf1928a4e8e1870f2fa05",//the file to playFlashplayer:"/flash/jwplayer.flash6.6.swf"//Play Flash Player address, need to replace your local player address      }); }</Script></HTML>

Display the control button and the flash background color is black (from the official website demo) Hide the control button and customize the JS effect that is performed after the playback is completeReference: Baidu Network Disk Jwplay latest version (6.10) and Broken * Version (6.6) View my online demo (using the official website of JS and player has logo) JW Player use profile JW Player documentation Configuration Options Reference JW Player JavaScript API Reference JW HTML config:configures JW player (5 & 6) using HTML only



From for notes (Wiz)



How to use JW player to play flash and hide the control button and customize the JS that is executed after the play is completed

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.