Ckplayer How to perfectly support m3u8 playback on your PC

Source: Internet
Author: User

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

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.