Oneself in the work to do a teaching site, click on the left course, the right to play the video, through the source code analysis, with this player
Website: http://www.ckplayer.com/
The specific use of the player on the website is quite clear.
- Div id="flashcontent"></div>
- <div id= "video" style= " position:relative;z-index: 100;width:600px;height:400px; " ><div id= "A1" ></div ></div>
- <script type= "Text/javascript" src= " Ckplayer/ckplayer.js " charset=" UTF-8 " ></script>
- <script type="Text/javascript" src="js/offlights.js" charset= "UTF-8"> </Script>
- <script type="Text/javascript">
- The following is the standard code for calling the player
- var flashvars={
- F: ' http://movie.ks.js.cn/flv/2011/11/8-1.flv ',//video address
- A: ',//parameter when called, only valid when S>0
- S: ' 0 ',//Call way,0 = Normal method (f= video address),1= url form,2=xml form,3=swf form (s>0 when f= URL, With a to complete the assembly of the address)
- C: ' 0 ',//whether to read the text configuration, 0 not, 1 is
- x: ',//Call XML style path, empty will use Ckplayer.js configuration
- I: ",//Initial picture address
- D: ' http://www.ckplayer.com/temp/11.jpg ',//pause when playing ads, swf/pictures
- U: ' http://www.baidu.com ',//pause if it is a picture, add a link address
- L: ' http://www.ckplayer.com/down/start.swf ',//advertisement before video start, swf/image/Video
- R: ",////video before the start of the picture/video with a link address
- T: ' 1 ',//time when the swf/picture is played before the video starts
- E: ' 3 ',//The action after the end of the video, 0 is to call the JS function, 1 is the loop play, 2 is the pause play, 3 is the plugin that calls the video recommendation list
- V: ' 85 ',//default volume, 0-100
- P: ' 1 ',//video default 0 is paused, 1 is play
- H: ' 1 ',//How to use the Drag method when playing the HTTP video stream, 0 is by key frame, 1 is by key point in time
- Q: ",///video stream Drag reference function, default is start
- M: ' 0 ',//whether the default is to use the Click play button before loading the video, 0 is not, 1 is, set to 1 o'clock do not have a front-facing ads
- G: ",//Video direct G seconds start playing
- J: ",//video advanced J seconds End
- K: ' 10|40|80 ',//cue point time, such as 30|60 mouse through the progress bar 30 seconds, 60 seconds will prompt N to specify the corresponding text
- N: ' Skip start | Baby penguin in the water | Skip the end ',//hint text, use with k, such as Cue point 1| cue point 2
- B: ' 0x000 ',//player background color, if not set, will be transparent by default
- W: ',//Specify a text file to invoke its own configuration without specifying a TXT file with the same name as the default call and player
- End of all parameters list of call player
- The following are the custom player parameters that are used in the plugin to refer to the
- My_title: ' video title ',//video title
- My_url: ' http://www.ckplayer.com/index.php ',//This page address
- My_summary: ' This is a test page ',//video description, please keep it in one line of text, do not wrap
- My_pic: ' http://www.ckplayer.com/temp/11.jpg '//share the image address
- Call the custom player parameter end
- };
- var params={bgcolor: ' #000000 ', allowfullscreen:true,allowscriptaccess: ' Always '};// This defines the other parameters of the player, such as the background color (unlike the B in Flashvars), whether full screen is supported, whether interactive is supported
- var attributes={id: ' ckplayer_a1 ', Name: ' Ckplayer_a1 '};
- The following line is called the player, in parentheses the parameter meaning: (player file, to be displayed in the div container, wide, high, need Flash version, when the user does not have the version of the prompt, load initialization parameters, load settings parameters such as background, load attributes parameters, Used primarily to set the player ID)
- swfobject.embedswf (' ckplayer/ckplayer.swf ', ' A1 ', ' I ', ' the ', ' 10.0.0 ', ' ckplayer/expressinstall.swf ', Flashvars, params, attributes); Player address, container ID, wide, high, need Flash plugin version, flashvars,params,attributes
- Call Player End
- Part I: Switching lights
- var box = new LightBox (' flashcontent ');
- var $=function (id) {return document.getElementById (ID)};
- function Closelights () {//Off light
- Box. Show ();
- $ (' video '). style.width=' 940px ';
- $ (' video '). style.height=' 550px ';
- Swfobject.getobjectbyid (' ckplayer_a1 '). width=940;
- Swfobject.getobjectbyid (' ckplayer_a1 '). height=550;
- }
- function Openlights () {//Turn on the light
- Box. Close ();
- $ (' video '). style.width=' 600px ';
- $ (' video '). style.height=' 400px ';
- Swfobject.getobjectbyid (' ckplayer_a1 '). width=600;
- Swfobject.getobjectbyid (' ckplayer_a1 '). height=400;
- }
- </Script>
Ckplayer, super Cool web player for integrated player in website