How can ckplayer perfectly support m3u8 and ckplayerm3u8 on PC?
Anyone who has used ckplayer knows that it is very easy to configure and use compared with other player. The function basically meets our needs.
In general, we use normal video formats such as mp4 and flv for playback. However, if the video file is too large, loading will be slow.
So we can convert the video into m3u8 format to solve this problem (Baidu m3u8 can be used to understand the principle. Simply put, it is to cut the video into several slices, each slice can be played independently and the size is small. Then, a file index is used to play these files in sequence, so it is very fast)
How to convert m3u8 format? Refer to my previous blog.
======================================
However, playing m3u8 with video on a PC is not supported. Fortunately, ckplayer has a plug-in that supports playing m3u8 on PC.
But pay attention to it. There is a huge hole. Do not install and configure this plug-in according to the instructions on the ckplayer official website! Various Errors may occur!
Actually very simple, download plug-in: m3u8.swf http://bbs.ckplayer.com/forum.php? Mod = viewthread & tid = 18168.
Download and decompress it. Copy the m3u8.swf file to any directory on your server. You can access it. For convenience, I put it in the ckplyer plug-in folder.
OK! Configuration successful! Is it easy? Just copy it. 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 broadcast, set lv: 1}; var params = {bgcolor: '# fff', allowFullScreen: true, allowScriptAccess: 'alway', wmode: 'transparent'}; var video = [src]; CKobject. embed ('HTTP: // static. guojiang. TV/pc/js/ckplayer/ckplayer.swf ', id, 'ck-video', '000000', '000000', false, flashvars, video, params );}
F: m3u8.swf address
A: The m3u8 video address you want to play
This is a success!
======================================
Remember: do not follow the steps on the official website! Remember!