Ckplayer Beginner's introduction super easy to use tutorial

Source: Internet
Author: User

The web player has a premise to use ( question 1).

~~~~~~~ Divider Line ~~~~~~~

Look at the player effect in one step ( Q 2):

Download the attachment, unzip the content (Ckplayer folder and ckplayer.html) to the website root directory, open your debugging website in the browser can see the effect of the page playing, such as:
Http://localhost/ckplayer.html

~~~~~~~ dividing line, to the point, use step ~~~~~~~

1, ibid, download the attachment and extract to the site root directory, in your site test environment to see if the player is displayed properly.

2, using EditPlus or DreamWeaver and other file editing tools to open the Web site root directory ckplayer.html file see the code is very simple, you try to modify s1.ckplayer_flv for their own video or other network video, and then refresh the browser, should be able to play OH ( question 3).

Actually here, you have learned the basic use of the player.

3. Apply to other pages in your website, then copy the code in ckplayer.html to the location where you want to load the video playback:

<script type= "Text/javascript" src= "/ckplayer/ckplayer.js" charset= "Utf-8" ></script>
<div id= "video" ></div><script type= "Text/javascript" >var s1=new swfupload ();//Video address S1.ckplayer_ flv= ' http://movie.ks.js.cn/flv/2011/11/8-1.flv ';//div's Ids1.swfwrite (' video ');</script>

Oh, it's simple.

Of course, Ckplayer function is very rich, this is just bucket function, as long as it will be simple to use, then you can download the official full version, I believe other features you can quickly get started with the application.

PS: Here to extract to the site root directory is just for quick to put into use, you can put in any folder in the site, in the various pages to call, very flexible ( Q 4).

Accessories: ckplayer.5.8. Ultra-Simple Package download

Finally sell Moe: In addition to the official way to call the player, here also prepared for you a more easy to use Ckplayer package call, on a number of sites I have applications, feel very good, perhaps you can also try:

See: Ckplayer Simple Package and user manual

Q 1:
Ckplayer is a network video player, commonly known as the FLV Web Player, and JW player is a class, of course, the use is much simpler than the JW, and the function is more suitable for Chinese use, the key is the full function of free and group friends to communicate more convenient.
Therefore, the player must be used in a Web server environment such as Iis/apache, simply to use the http://www.domain.com/xxx or local http://localhost/xxx way to open the Web page for normal use, When you test, you can build a local Web test environment, or you can upload directly to your current site space with domain name to access and debug. Directly double-click the way to open the Web page is not drip.

Q 2:
Attachment content in all aspects of the functions are fully consistent with the official, with the official update, please rest assured that use. Only modified the default several parameters, with this tutorial more convenient for novice use and packaging, can download the official Lite version of the comparison.

Q 3:
If you change the s1.ckplayer_flv to a network video to play, instead of the video in your own website can not play, there are several reasons:
1, the video format does not support, Ckplayer also most Web player, support H264 encoding MP4, F4V, MOV and commonly used FLV format, because the network play needs side buffer side play, the format has more stringent requirements. Like AVI, RMVB, dat What this is a desktop player such as storm, KMP flow work.
2, Video format server is not supported, that is, MIME settings are not correct, you need to set the appropriate file format mime in IIS (detailed inquiry forum or Baidu):
. flv, Application/octet-stream or video/x-flv or Flv-application/octet-stream
. MP4-Application/octet-stream or Video/x-mp4
. F4V-Application/octet-stream or VIDEO/X-F4V
After setting, remember to restart IIS.
3, the video address is not correct, you try to access the video address directly in the test environment to see if it can be accessed, such as with Http://localhost/video/1.mp4.

Q 4:
The official packaging is the use of the relative path file package, because the player to load flash, loading the skin, there are several paths to be set correctly to use, many novice friends use the official package will encounter black screen , Unable to load the player and other issues, In fact, because the path or JS file is not properly loaded caused by, so specifically to do this absolute root path of the file packaging, convenient for novice friends to download immediately after the use of the results can be seen.
In contrast to the official lite package, the following changes have been made:
1. ckplayer/ckplayer.js File:
Ck.cpath = '/ckplayer/assets/'; Style total path, (14 rows) set to root path
Ck.control_r= ' null,2,1,-75,-100,1 ';//The Right adjustment button file, (32 lines) temporarily removed the plugin
This.ckplayer_url = '/ckplayer/ckplayer.swf '; (125 rows) default the player's location and file
This.ckplayer_style = 0; (128 lines) The default video type is changed to 0, which is the single video address playback mode
2, index.htm file renamed to Ckplayer.html, in order to understand the root of your website will not be destroyed by your original home page file, and the simplest call code, look more relaxed.

Ckplayer Beginner's introduction super easy to use tutorial

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.