Ckplayer, super Cool web player for integrated player in website

Source: Internet
Author: User

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.

  1. Div id="flashcontent"></div>
  2.  <div id= "video"  style= " position:relative;z-index: 100;width:600px;height:400px; " ><div id= "A1" ></div ></div>  
  3. <script type= "Text/javascript"  src= " Ckplayer/ckplayer.js " charset=" UTF-8 " ></script>  
  4. <script type="Text/javascript" src="js/offlights.js" charset= "UTF-8"> </Script>
  5. <script type="Text/javascript">
  6. The following is the standard code for calling the player
  7. var flashvars={
  8. F: ' http://movie.ks.js.cn/flv/2011/11/8-1.flv ',//video address
  9. A: ',//parameter when called, only valid when S>0
  10. 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)
  11. C: ' 0 ',//whether to read the text configuration, 0 not, 1 is
  12. x: ',//Call XML style path, empty will use Ckplayer.js configuration
  13. I: ",//Initial picture address
  14. D: ' http://www.ckplayer.com/temp/11.jpg ',//pause when playing ads, swf/pictures
  15. U: ' http://www.baidu.com ',//pause if it is a picture, add a link address
  16. L: ' http://www.ckplayer.com/down/start.swf ',//advertisement before video start, swf/image/Video
  17. R: ",////video before the start of the picture/video with a link address
  18. T: ' 1 ',//time when the swf/picture is played before the video starts
  19. 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
  20. V: ' 85 ',//default volume, 0-100
  21. P: ' 1 ',//video default 0 is paused, 1 is play
  22. 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
  23. Q: ",///video stream Drag reference function, default is start
  24. 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
  25. G: ",//Video direct G seconds start playing
  26. J: ",//video advanced J seconds End
  27. 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
  28. N: ' Skip start | Baby penguin in the water | Skip the end ',//hint text, use with k, such as Cue point 1| cue point 2
  29. B: ' 0x000 ',//player background color, if not set, will be transparent by default
  30. 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
  31. End of all parameters list of call player
  32. The following are the custom player parameters that are used in the plugin to refer to the
  33. My_title: ' video title ',//video title
  34. My_url: ' http://www.ckplayer.com/index.php ',//This page address
  35. My_summary: ' This is a test page ',//video description, please keep it in one line of text, do not wrap
  36. My_pic: ' http://www.ckplayer.com/temp/11.jpg '//share the image address
  37. Call the custom player parameter end
  38. };
  39. 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
  40. var attributes={id: ' ckplayer_a1 ', Name: ' Ckplayer_a1 '};
  41. 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)
  42. 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
  43. Call Player End
  44. Part I: Switching lights
  45. var box = new LightBox (' flashcontent ');
  46. var $=function (id) {return document.getElementById (ID)};
  47. function Closelights () {//Off light
  48. Box. Show ();
  49. $ (' video '). style.width=' 940px ';
  50. $ (' video '). style.height=' 550px ';
  51. Swfobject.getobjectbyid (' ckplayer_a1 '). width=940;
  52. Swfobject.getobjectbyid (' ckplayer_a1 '). height=550;
  53. }
  54. function Openlights () {//Turn on the light
  55. Box. Close ();
  56. $ (' video '). style.width=' 600px ';
  57. $ (' video '). style.height=' 400px ';
  58. Swfobject.getobjectbyid (' ckplayer_a1 '). width=600;
  59. Swfobject.getobjectbyid (' ckplayer_a1 '). height=400;
  60. }
  61. </Script>

Ckplayer, super Cool web player for integrated player in website

Related Article

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.