The students who have used Ckplayer know that the relative jwplayer etc., it is very easy to configure and use. function is basically to meet our needs.
In general, we use normal video formats such as mp4,flv and so on, but if the video file is too large, it will load more slowly.
So we can turn the video into m3u8 format to solve this problem (can Baidu m3u8 to understand the principle, the simple point is that he is the video cut into several slices, each slice can be played independently and small size, and then use a file index to play these files sequentially, so soon)
How do I go to m3u8 format? Refer to my previous blog post.
=======================
However, it is not supported to use video to play m3u8 on a PC. Fortunately, Ckplayer has a plugin that supports m3u8 in PC playback.
But watch out. There is a giant pit, do not according to Ckplayer official website instructions to install the configuration of this plugin! There will be a variety of errors!
Actually very simple, download plugin: m3u8.swf http://bbs.ckplayer.com/forum.php?mod=viewthread&tid=18168
After download, unzip, copy the m3u8.swf file to your server any directory, you can access the good, for convenience I was placed in the Ckplyer plugin folder.
Ok! Configuration is successful! Isn't it simple? Just copy it and it's OK!
Next is JS:
Showplayer (' http://static.guojiang.tv/pc/video/sound/1/playlist.m3u8 ', ' videowrap ') function showplayer (SRC, ID) { //player var flashvars={ f: ' http://static.guojiang.tv/pc/js/ckplayer/m3u8.swf ', a:src, c:0, s:4, lv:0//Note, if it is live, you need to set lv:1 }; var params={bgcolor: ' #FFF ', allowfullscreen:true,allowscriptaccess: ' Always ', wmode: ' Transparent '}; var video=[src]; ckobject.embed (' http://static.guojiang.tv/pc/js/ckplayer/ckplayer.swf ', id, ' ck-video ', ' 100% ', ' 100% ', false, Flashvars, video, params); }
F:M3U8.SWF's address
A: The m3u8 video address you want to play
At this point, it's done!
============================
Remember: Do not follow the steps of the official website! Remember!
Ckplayer How to perfectly support m3u8 playback on your PC