– Apache配置
下载mod_flvx.so、mod_h264_streaming.so模块。
注意:apache以及模块的x86、x64的版本对应[下述模块针对apache x86 2.2及以下版本]。
下载地址:链接:http://pan.baidu.com/s/1dEzYX4d 密码:jb0i
编辑apache\conf\httpd.conf,查找LoadModule,在LoadModule的最后面(或者附近)配置:
LoadModule flvx_module modules/mod_flvx.so
AddHandler flv-stream .flv
LoadModule h264_streaming_module modules/mod_h264_streaming.so
AddHandler h264-streaming.extensions .mp4
重启apache即可,如果apache不能启动,请确认模块的版本是否与apache版本一致。
– 视频播放示例
将ckplayer文件夹放置网站根目录,将示例视频“exmaple.flv”放置网站根目录。
新建video.html,代码如下:
视频流播放var flashvars={
f:'http://localhost/example.flv',
c:0
};
var params={bgcolor:'#FFF',allowFullScreen:true,allowScriptAccess:'always',wmode:'transparent'};