WordPress视频播放插件(Smartideo)安装方法
你可以在后台插件管理页面中直接搜索Smartideo并安装.

或者上传文件夹smartideo至/wp-content/plugins/目录.
在插件管理页面中激活Smartideo.

Smartideo插件使用方法
你可以直接粘贴视频播放也完整的URL到编辑器(单独一行),就可以加载视频播放器。
URL地址格式如下
http://v.youku.com/v_show/id_XMTYzNTgxNTMy.html
http://www.tudou.com/programs/view/YBdHhxJqrLY/
http://www.56.com/u35/v_MTEwMjM5NDcy.html
http://v.qq.com/page/o/9/f/o0142tt1m9f.html
http://v.qq.com/cover/t/tyeqdw6rof7t5ow/p0015kjlai9.html
http://my.tv.sohu.com/us/94469256/77228432.shtml
http://www.wasu.cn/Play/show/id/5079941
http://v.yinyuetai.com/video/2207109
http://v.ku6.com/show/P0Ib_pTne6-FBSa1AbtKUQ...html
http://www.letv.com/ptv/vplay/20932037.html
<?php
/*
PluginName:Smartideo
PluginURI:http://www.fengziliu.com/
Description:Smartideo是为WordPress添加对在线视频支持的一款插件(支持手机、平板等设备HTML5播放)。目前支持优酷、搜狐视频、土豆、56、腾讯视频、新浪视频、酷6、华数、乐视等网站。
Version:1.2
Author:FensLiu
AuthorURI:http://www.fengziliu.com/smartideo-for-wordpress.html
*/
define('SMARTIDEO_VERSION','1.0');
define('SMARTIDEO_URL',plugins_url('',__FILE__));
define('SMARTIDEO_PATH',dirname(__FILE__));
$smartideo=newsmartideo();
classsmartideo{
private$width='100%';
private$height='500';
private$mobile_width='100%';
private$mobile_height='250';
publicfunction__construct(){
if(is_admin()){
add_action('admin_menu',array($this,'admin_menu'));
}
$option=get_option('smartideo_option');
if(!empty($option)){
$option=json_decode($option,true);
}else{
$option=array();
}
extract($option);
if(!empty($width)){
$this->width=$width;
}
if(!empty($height)){
$this->height=$height;
}
if(!empty($mobile_width)){
$this->mobile_width=$mobile_width;
}
if(!empty($mobile_height)){
$this->mobile_height=$mobile_height;
}
wp_embed_register_handler('smartideo_tudou',
'#https?://(?:www.)?tudou.com/(?:programs/view|listplay/(?<list_id>[a-z0-9_=-]+))/(?<video_id>[a-z0-9_=-]+)#i',
array($this,'smartideo_embed_handler_tudou'));
wp_embed_register_handler('smartideo_56',
'#https?://(?:www.)?56.com/[a-z0-9]+/(?:play_album-aid-[0-9]+_vid-(?<video_id1>[a-z0-9_=-]+)|v_(?<video_id2>[a-z0-9_=-]+))#i',
array($this,'smartideo_embed_handler_56'));
wp_embed_register_handler('smartideo_youku',
'#https?://v.youku.com/v_show/id_(?<video_id>[a-z0-9_=-]+)#i',
array($this,'smartideo_embed_handler_youku'));
wp_embed_register_handler('smartideo_qq',
'#https?://v.qq.com/(?:cover/g/[a-z0-9_.]+?vid=(?<video_id1>[a-z0-9_=-]+)|(?:[a-z0-9/]+)/(?<video_id2>[a-z0-9_=-]+))#i',
array($this,'smartideo_embed_handler_qq'));
wp_embed_register_handler('smartideo_sohu',
'#https?://my.tv.sohu.com/us/(?:d+)/(?<video_id>d+)#i',
array($this,'smartideo_embed_handler_sohu'));
wp_embed_register_handler('smartideo_wasu',
'#https?://www.wasu.cn/play/show/id/(?<video_id>d+)#i',
array($this,'smartideo_embed_handler_wasu'));
wp_embed_register_handler('smartideo_yinyuetai',
'#https?://v.yinyuetai.com/video/(?<video_id>d+)#i',
array($this,'smartideo_embed_handler_yinyuetai'));
wp_embed_register_handler('smartideo_ku6',
'#https?://v.ku6.com/show/(?<video_id>[a-z0-9-_.]+).html#i',
array($this,'smartideo_embed_handler_ku6'));
wp_embed_register_handler('smartideo_letv',
'#https?://www.letv.com/ptv/vplay/(?<video_id>d+)#i',
array($this,'smartideo_embed_handler_letv'));
}
publicfunctionsmartideo_embed_handler_tudou($matches,$attr,$url,$rawattr){
if(wp_is_mobile()){
$embed=$this->get_iframe("http://www.tudou.com/programs/view/html5embed.action?type=0&code={$matches['video_id']}");
}else{
$embed=$this->get_embed("http://www.tudou.com/v/{$matches['video_id']}/&resourceId=0_05_05_99&bid=05/v.swf");
}
returnapply_filters('embed_tudou',$embed,$matches,$attr,$url,$rawattr);
}
publicfunctionsmartideo_embed_handler_56($matches,$attr,$url,$rawattr){
$matches['video_id']=$matches['video_id1']==''?$matches['video_id2']:$matches['video_id1'];
if(wp_is_mobile()){
$embed=$this->get_iframe("http://www.56.com/iframe/{$matches['video_id']}");
}else{
$embed=$this->get_embed("http://player.56.com/v_{$matches['video_id']}.swf");
}
returnapply_filters('embed_56',$embed,$matches,$attr,$url,$rawattr);
}
publicfunctionsmartideo_embed_handler_youku($matches,$attr,$url,$rawattr){
if(wp_is_mobile()){
$embed=$this->get_iframe("http://player.youku.com/embed/{$matches['video_id']}");
}else{
$embed=$this->get_embed("http://player.youku.com/player.php/sid/{$matches['video_id']}/v.swf");
}
returnapply_filters('embed_youku',$embed,$matches,$attr,$url,$rawattr);
}
publicfunctionsmartideo_embed_handler_qq($matches,$attr,$url,$rawattr){
$matches['video_id']=$matches['video_id1']==''?$matches['video_id2']:$matches['video_id1'];
if(wp_is_mobile()){
$embed=$this->get_iframe("http://v.qq.com/iframe/player.html?vid={$matches['video_id']}");
}else{
$embed=$this->get_embed("http://static.video.qq.com/TPout.swf?vid={$matches['video_id']}");
}
returnapply_filters('embed_qq',$embed,$matches,$attr,$url,$rawattr);
}
publicfunctionsmartideo_embed_handler_sohu($matches,$attr,$url,$rawattr){
if(wp_is_mobile()){
$embed=$this->get_iframe("http://tv.sohu.com/upload/static/share/share_play.html#{$matches['video_id']}_0_0_9001_0");
}else{
$embed=$this->get_embed("http://share.vrs.sohu.com/my/v.swf&topBar=1&id={$matches['video_id']}&autoplay=false&xuid=&from=page");
}
returnapply_filters('embed_sohu',$embed,$matches,$attr,$url,$rawattr);
}
publicfunctionsmartideo_embed_handler_wasu($matches,$attr,$url,$rawattr){
if(wp_is_mobile()){
$embed=$this->get_iframe("http://www.wasu.cn/Play/iframe/id/{$matches['video_id']}");
}else{
$embed=$this->get_embed("http://s.wasu.cn/portal/player/20141216/WsPlayer.swf?mode=3&vid={$matches['video_id']}&auto=0&ad=4228");
}
returnapply_filters('embed_wasu',$embed,$matches,$attr,$url,$rawattr);
}
publicfunctionsmartideo_embed_handler_yinyuetai($matches,$attr,$url,$rawattr){
$embed=$this->get_embed("http://player.yinyuetai.com/video/player/{$matches['video_id']}/v_0.swf");
returnapply_filters('embed_yinyuetai',$embed,$matches,$attr,$url,$rawattr);
}
publicfunctionsmartideo_embed_handler_ku6($matches,$attr,$url,$rawattr){
$embed=$this->get_embed("http://player.ku6.com/refer/{$matches['video_id']}/v.swf");
returnapply_filters('embed_ku6',$embed,$matches,$attr,$url,$rawattr);
}
publicfunctionsmartideo_embed_handler_letv($matches,$attr,$url,$rawattr){
$embed=$this->get_embed("http://i7.imgs.letv.com/player/swfPlayer.swf?id={$matches['video_id']}&autoplay=0");
returnapply_filters('embed_letv',$embed,$matches,$attr,$url,$rawattr);
}
privatefunctionget_embed($url){
$embed=sprintf(
'<embedsrc="%1$s"allowFullScreen="true"quality="high"width="%2$s"height="%3$s"allowScriptAccess="always"type="application/x-shockwave-flash"></embed>',
$url,$this->width,$this->height);
return$embed;
}
privatefunctionget_iframe($url){
$iframe=sprintf(
'<iframesrc="%1$s"width="%2$s"height="%3$s"frameborder="0"allowfullscreen="true"></iframe>',
$url,$this->mobile_width,$this->mobile_height);
return$iframe;
}
publicfunctionadmin_menu(){
add_plugins_page('Smartideo设置','Smartideo设置','manage_options','smartideo_settings',array($this,'admin_settings'));
}
publicfunctionadmin_settings(){
if($_POST['smartideo_submit']=='保存'){
$param=array('width','height','mobile_width','mobile_height');
$json=array();
foreach($_POSTas$key=>$val){
if(in_array($key,$param)){
$json[$key]=$val;
}
}
$json=json_encode($json);
update_option('smartideo_option',$json);
}
$option=get_option('smartideo_option');
if(!empty($option)){
$option=json_decode($option,true);
}
if(empty($option['width'])){
$option['width']='100%';
}
if(empty($option['height'])){
$option['height']='500';
}
if(empty($option['mobile_width'])){
$option['mobile_width']='100%';
}
if(empty($option['mobile_height'])){
$option['mobile_height']='250';
}
echo'<h2>Smartideo设置</h2>';
echo'<formaction=""method="post">
<tableclass="form-table">
<trvalign="top">
<thscope="row">播放器宽度</th>
<td>
<label><inputtype="text"class="regular-textcode"name="width"value="'.$option['width'].'"></label>
<br/>
<pclass="description">默认宽度为100%</p>
</td>
</tr>
<trvalign="top">
<thscope="row">播放器高度</th>
<td>
<label><inputtype="text"class="regular-textcode"name="height"value="'.$option['height'].'"></label>
<br/>
<pclass="description">默认高度为500px</p>
</td>
</tr>
<trvalign="top">
<thscope="row">移动设备播放器宽度</th>
<td>
<label><inputtype="text"class="regular-textcode"name="mobile_width"value="'.$option['mobile_width'].'"></label>
<br/>
<pclass="description">手机、平板等设备访问时,默认宽度为100%</p>
</td>
</tr>
<trvalign="top">
<thscope="row">移动设备播放器高度</th>
<td>
<label><inputtype="text"class="regular-textcode"name="mobile_height"value="'.$option['mobile_height'].'"></label>
<br/>
<pclass="description">手机、平板等设备访问时,默认高度为250px</p>
</td>
</tr>
</table>
<pclass="submit"><inputtype="submit"name="smartideo_submit"id="submit"class="button-primary"value="保存"></p>
</form>';
}
}
在wordpress上播放在线视频要怎么设置呢?有了这款Smartideo视频插件就简单多了,它可以帮助你快速在wordpress添加在线视频,支持手机、平板的HTML5播放,它支持优酷、搜狐视频、土豆、56、腾讯视频、新浪视频、酷6、华数、乐视等热门网站的视频。
[WordPress插件怎样安装WordPress插件安装方法]圣战屠龙游戏下载-圣战屠龙传奇1.5.7 高爆版
万博兄弟 惨 华体汇买球 澳博足彩官网 宝博棋牌娱乐网 设备用吸尘器展开内容
AB童模app下载-AB童模软件5.8.5最新版
瑭灵纪元九游下载-瑭灵纪元九游版1.0.21 九游版
瓶子射击学院游戏下载-Gun Bottle Shoot(瓶子射击学院3D游戏)3.6安卓版
改进吧软件2.2.2 安卓版
皇帝成长计划2修改2.1.0 最新版
查查条形码比价下载-查查条形码比价10.4.6 安卓最新版
高考加油表情包-小可爱们高考加油表情包完整版
嫂多多手机app2.0.0 安卓版
问道轩辕录最新版下载-问道轩辕录游戏1.0 安卓正版
杰克假日逃亡游戏下载-Jack(杰克假日逃亡手游)0.1 安卓版
淘宝主图素材-淘宝化妆品主图素材psd格式【高清免费版】
淘宝双十二年终盛典装修软件-淘宝双十二年终盛典装修素材中文官方版
民生山西app养老认证下载-民生山西养老人脸识别app2.1.1 官方版
微游戏航海战纪新浪版下载-新浪微游戏航海战纪1.0 Q版
天天挤公交游戏2.3.5 安卓版
归谷智平台下载-归谷智平台app1.0.4安卓正式版
嗨桌面app下载-嗨桌面桌面小组件主题壁纸2.1.0 官方正版
SketchBookPro 2011破解版下载-Autodesk SketchBookPro 2011中文破解版5.0.0.0 【附破解教程】
五笔词库下载-五笔字型编码表(王码86/98原始码表)
简记时刻APP下载-简记时刻1.5.30 官方最新版
全局透明壁纸最新版2018下载-全局透明屏幕(全局动态透明壁纸app)2018安卓免费版
炜捷洗车app1.0.0 安卓版
幸存者危城单机版下载-幸存者危城单机版3.11 二测版
掌上咸丰app1.1.2 安卓版
卓立德app下载-卓立德教育2.4.3 安卓官方版
8.3/1,915.2M
中国空军招飞网是由中国空军招飞局主办,主要用于发布中国空军招飞和青少年航空学校相关新闻,发布政策规定和选拔检测日程安排,便利考生报名和检测,传播空军正能量、立起...
哩哩哩哩app下载-哩哩哩哩lililili最新版1.1.0 安卓版
10.0/240.7M
哩哩哩哩lililili最新版这个是官方安卓最新版本,这个软件暂时还没有ios版本,这是一款免费的影视软件,这款软件里面的资源主要是以动漫为主,里面的动漫资源类...
范海辛的奇妙冒险32位修改器-范海辛的奇妙冒险3十九项修改器1.0 h4xor版
10.0/104.2M
范海辛的奇妙冒险3十九项修改器是一款同名游戏范海辛的奇妙冒险3的游戏修改器。超级强大的功能,让你在游戏中处于无敌的状态。有需要的朋友快来下载使用吧!范海辛的奇妙...
网易狼人杀周年限定版下载-网易狼人杀六周年版2.12.4 庆典版
9.2/1,320.1M
狼人杀三周年庆典活动已经全面开启!除了上线全新12人板子永序之轮及新角色蚀时狼妃、定序王子之外,游戏内也展开了一系列庆祝活动。同时狼人杀携手网易LOFTER开启...
班班幼儿园3手机版下载安装免费版-班班幼儿园3免费版1.0 最新版
9.7/1,301.5M
班班幼儿园3是一款卡通画风中带点恐怖元素的冒险手游,游戏中内容很丰富,玩法多样,贴别是游戏的氛围感,做的很到位,对于恐怖冒险游戏来说,已经成功了一半,感兴趣的小...
8.2/851.7M
有时候需要被人帮忙送一点东西或者取货,这里给大家推荐这款郑州跑腿服务,支持各种上门跑腿服务,有需要的可以下载试试。郑州跑腿服务特色郑州跑腿服务解决同城人一切需要...
led电子显示屏-LED显示屏无线发布系统2.2.0.0 桌面版
8.6/264.7M
LED显示屏无线发布系统是一款led显示屏操纵控制软件。这个系统如同主脑一样可以控制多个LRD显示屏非常的强。有需要的可以来东坡下载使用!LED显示屏无线发布系...
7.7/823.0M
三分资讯提供专心专业的新闻资讯的软件,为指定的用户提供最新的新闻信息,有需要的用户可以免费的下载体验,同时目前只是支持苹果的版本下载!三分资讯软件苹果版介绍三分...
百度知道等级批量查询-百度知道等级查询工具1.0 绿色免费版
9.2/1,229.3M
做营销有很多种方法,百度知道也是一种,怎样快速了解别人百度知道的等级呢?这款百度知道等级查询工具能批量查询百度知道等级,使用简单,一键查询,非常方便!百度知道等...
9.9/1,696.6M
水上摩托艇模拟器是一款非常逼真的模拟手游,在游戏之中玩家驾驶摩托艇,与专业的竞赛选手竞技,在保证自身安全的前提下,更先一步到达终点,感兴趣的小伙伴快来东坡下载吧...
全面战争领主之战下载-全面战争领主之战手游1.0.1 安卓版
10.0/1,254.7M
有趣会让人上瘾的实时战略游戏,全面战争领主之战以火材人为角色,有不同的游戏模式,控制战士开始进行战斗,将对手摧毁。全面战争领主之战手游特点1.控制你的军队形成编...
动漫少女制造制造手游下载-动漫少女制造游戏1.0.0 安卓版
9.9/576.6M
动漫少女制造是一款萌系卡通少人物换装休闲游戏。玩家可以在游戏中制造出自己喜欢的卡通角色,海里的服装和发型配饰任你搭配。造出你喜欢的小人。多种游戏模式,给你绝佳的...
2017造价师万题库app下载-2017造价师万题库3.7.9苹果最新版
9.4/410.7M
2017造价师万题库是一款非常专业的工程类学习软件平台,这里为大家提供建设部造价师执业资格证考试全部题库,覆盖了考试大纲内全部考点及名师试题解析讲解,2017造...
8.0/1,815.1M
4S站是一个汽车配件商城软件,为汽车修理厂提供各种汽车配件,便捷的采购平台,让你可以随时间买到需要的配件,支持免费配送!4S站商户版介绍4S站商户版—专注于服务...
我与汪星人汉化版下载-我与汪星人手游中文版1.0.4 安卓最新版
8.6/657.5M
我与汪星人是一款非常有趣的宠物养成休闲游戏。玩家将在游戏中领养很多可爱的小狗狗,不同的类型任你选择。休闲的玩法,你有一个汪星人的后院。丰富的游戏剧情,多样化的游...
9.4/1,563.1M
如果你有创意有想法就可以来,没有也可以来妙呀app看一看,这里汇集了众多的人,一起分享创意的设计,和其他的设计师进行交流。妙呀app简介妙呀app是以创意和兴趣...
9.6/1,129.7M
二当家手机app是由上海建工二建集团有限公司研发的一款集团员工信息交流平台,为用户提供给集团青年的内部活动发布,欢迎下载!二当家手机app功能介绍草根主播也能参...
三国志幻想大陆精英测试服-三国志幻想大陆精英版4.8.11体验服
9.6/1,238.1M
三国志幻想大陆精英版拥有超多的三国英雄构造,完美的还原了三国历史的经典战役,每个武将都具备不同的战斗,解锁武将更多的技能,创造出起无数的组合。三国志幻想大陆精英...
7.8/155.2M
易集买可以召集你的好友在网上发起团购,买到实惠便宜的商品,发布消息招募团友,大家一起团购,买实惠买放心!易集买软件说明易集买是一款实用的可以发起团购的手机服务软...
9.6/1,574.9M
小扳手app是一款智能化运维O2O平台,利用这款软件,可以对监控对讲、门禁系统、停车道闸、电子巡更进行一键报备维修,非常的方便实用!软件介绍“小扳手e维网”是南...
7.8/405.6M
一款充满趣味的解压益智玩法手游,想象有一款游戏,您可以在其中表达自己的创造力,并不断获得乐趣!这个木雕游戏可以提供这一切!成为一名真正的木匠,制作自己想要的雕塑...
7.9/1,287.3M
动作竞技,只此一家,网易推出的永劫无间手游的云游戏版本,占用内存更小,账号互通,支持手机版本,电脑版本下载桌面版本是一样的效果,就是偶尔可能是需要排队的,高画质...
7.8/1,344.3M
知识容器是一款为组织打造的知识分享、互动与移动学习平台,帮助企业、学校等组织进行有效的知识传递、沉淀与管理。让每一个组织轻松成为高效的学习型组织。高效知识容器a...
安卓增强工具包-安卓高级智能增强工具包1.0.8 专业版【25合1】
7.8/374.1M
能工具高级工具包是移动应用工具包和工具箱应用管理器的一体化更新,具有25个智能木工和计量工具或完整工具,如闪光灯,速度计,WiFi速度测试仪,指南针,简单笔记,...
防御丧尸射击最新版下载-Zombie Defense Force(防御丧尸射击手游)2.6.9 中文版
7.7/691.3M
防御丧尸射击是一款很好玩的僵尸射击战斗手游。游戏有着丰富的玩法内容,玩家将成为主角进行末日生存之路。多种游戏模式,你需要使用各种武器进行战斗慢慢的提升自己的装备...