How can ckplayer perfectly support m3u8 and ckplayerm3u8 on PC?

Source: Internet
Author: User

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!

 

 

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.