释放双眼,带上耳机,听听看~!
已更新使用video.js,请前往查看
以下方法可用但过时,请放弃。。
首先在所用的主题文件functions.php里添加以下代码
//视频播放
function ckplayer($atts, $content=null){
extract(shortcode_atts(array("auto"=>'0'),$atts));
return '<embed src="'.$content.'" allowFullScreen="false" quality="high" width="100%" height="450px" align="middle" allowScriptAccess="always"> ';
}
add_shortcode('ck1','ckplayer');
//添加文本模式下快捷按钮
function ckwoa_add_quicktags() {
?>
<script type="text/javascript">
QTags.addButton( 'ck1', '免费视频', '[ck1]','[/ck1]' );
QTags.addButton( 'ck2', 'm3u8视频', '[ck2]/ckplayer/ckplayer.swf?=player&video=','[/ck2]' );
QTags.addButton( 'ck3', '会员视频', '<!--loginview start-->[ck3]','[/ck3]<!--loginview end-->' );
QTags.addButton( 'ck4', '会员m3u8视频', '<!--loginview start-->[ck4]/ckplayer/ckplayer.swf?=player&video=','[/ck4]<!--loginview end-->' );
</script>
<?php
}
add_action('admin_print_footer_scripts', 'ckwoa_add_quicktags' );
会员视频就是加了个登陆可见功能需要使用登陆可见工具,需要下载和使用登陆可见插件且隐藏代码是loginview start
然后在根目录添加ckplayer文件夹,在ckplayer官网下载,下载好后将ckplayer文件夹房子自己的根目录即可。
[download]http://www.ckplayer.com/down/[/download]
注意:若使用的是wordpress经典编辑器则在html模式下可以看到按钮启用,若是古腾堡编辑器则在段代码工具添加代码,具体代码如下:
1,直连视频代码:
[ck1]**这里放直接播放视频 的链接**[/ck1]
2,m3u8视频代码:
[ck2]/ckplayer/ckplayer.swf?=player&video=这里放播放视频的m3u8链接[/ck2]