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

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

[WordPress插件怎样安装WordPress插件安装方法]
<?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>';
}
}
Smartideo插件使用方法Noblesse M Global游戏下载-Noblesse M Global手游1.0.2 安卓官方版
你可以直接粘贴视频播放也完整的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
在wordpress上播放在线视频要怎么设置呢?有了这款Smartideo视频插件就简单多了,它可以帮助你快速在wordpress添加在线视频,支持手机、平板的HTML5播放,它支持优酷、搜狐视频、土豆、56、腾讯视频、新浪视频、酷6、华数、乐视等热门网站的视频。
展开内容
洋光校园下载-洋光校园软件3.6.2 安卓版
希亚之光萌娘机战游戏下载-希亚之光萌娘机战手游1.0全新版本
电影生死96小时观后感作文大全doc完整免费版
Puray App下载-Puray富氢水补水喷雾仪app2.9.7 安卓版
中国摄协app下载-中国摄协手机app1.3.4 安卓官方版
Switsh Falling Ball(交替落球)1.0.1 安卓版
Ml文件管理器下载-Ml文件管理器1.1 最新版
浙聚财app1.0.2 安卓版
射击跑酷手游下载-射击跑酷游戏1.3 安卓中文版
新现代汉语字典ios版下载-新现代汉语字典专业版2.6 官方苹果版
我的免费小说手机版下载-我的免费小说软件1.20 安卓最新版
4虎视频大师下载安装-4虎视频大师1.1 安卓版
Autodesk2020注册机下载-Autodesk 2020全系列注册机1.0 绿色免费版
侠客无双1.8.5无cd作弊版下载-侠客无双1.8.5破解版【定制英雄破解可存档+各类特权+超多修改】
惠购屋app安卓版下载-惠购屋app0.0.1 安卓免费版
8.5/776.7M
大皖新闻app是一款互联网新闻资讯服务软件,为用户提供最及时的新闻报道,专注本地热门新闻资讯,并为用户提供贴心的生活服务!大皖新闻app介绍大晥手机新闻客户端,...
网易无尽战区pc下载-网易无尽战区客户端1.0.112 官方最新版
8.4/1,666.1M
网易无尽战区是一款科幻题材的3D动作MOBA游戏,游戏中有多种角色,拥有多种战斗方式,还融入格斗游戏玩法,从地面到天空,从远处到贴身,全方位的体验游戏的激情。网...
移动电商网站账号注册机-手机电商网站注册机1.67 绿色免费版【华为/小米/乐视/一加】
9.3/1,940.2M
手机电商网站注册差不多支持国产所有智能机,如华为、小米、努比亚、魅族、乐视、ZUK、一加、美图等等,软件使用简单,能批量注册账号,对于需要大量手机账号的朋友非常...
8.9/245.8M
使用养植物的方式来培养你的好习惯,口袋植物专注采用了超级可爱的画风,有各种植物,在好习惯中累计雨滴浇灌植物。口袋植物专注介绍口袋植物专注是一款游戏化的时间管理工...
9.1/1,967.9M
抖去水印小工具最新版,是一款超实用的去水印神器。它搭载多种去水印方法,能精准满足不同用户的需求,帮你一键快速清除图片和视频里的水印、文字、杂物等,操作便捷高效。...
7.5/1,787.0M
早教故事app,提供海量经典早教故事,文学名著、民间传说、启蒙故事,童话经典等一应俱全,对于喜欢的故事可以收藏起来,方便下次继续收听哟!早教故事介绍早教故事囊括...
7.8/563.4M
锦鲤写作app是一款可以帮助用户完成文章内容的码字软件,特别适合喜欢写小说的朋友,采用了智能生成方法,轻松解决写作问题,通过语音转换文字享受最佳的书写模式!锦鲤...
10.0/1,322.6M
海心抗癌是一款为癌症患者提供持续精准健康建议,帮助患者进行疗程管理的移动健康产品。主要功能通过将癌症相关指南与人工智能相结合,综合考虑癌症治疗过程中的复杂因素,...
9.6/1,680.6M
打造了很多生活中的场景,用来给宝宝早教非常的不错,巧虎官方hd覆盖了丰富的学习领域,由浅入深,专属的记录,全新的升级,为宝贝成长提供加持。巧虎官方HD版特点巧虎...
8.4/1,979.4M
经典复古传奇高爆版是一款自由度超高的传奇手游,这里有着更快速的升级速度,这里有着更火爆的竞技玩法,海量的福利奖励,能够让玩家拿到手软,自由的技能搭配,可以让玩家...
几何冲刺世界(Geometry Dash World)免费版-几何冲刺世界(Geometry Dash World)1.0苹果版
8.8/1,158.5M
几何冲刺世界(GeometryDashWorld)是一款音乐类型的闯关休闲类手游,游戏难度适中老少皆宜,大家完成挑战之后可以解锁新的造型和颜色哦,绝对是一款全民...
简约时尚商务PPT模板下载-简约时尚欧美风商务PPT模板(注重时尚)绿色免费版
9.2/1,820.1M
简约时尚欧美风商务PPT模板是一款具有欧美风格的时尚ppt模板,十分的精美,非常的简洁,喜欢简单大方的朋友一定喜欢这款ppt模板!简约时尚欧美风商务PPT模板详...
9.9/706.4M
樱花校园之小魔仙是一款根据樱花校园模拟器改编而来的跑酷手游,玩家操控小魔仙在城市上空进行跑酷,画风与樱花校园模拟器差不多,感兴趣的小伙伴快来东坡下载吧!樱花校园...
8.8/1,796.8M
DD输入法app是一款提供随机抽词发送的软件,在提供基本的相关拼音输入九键和二十六键输入之外还设置有许多有趣的玩法内容。简单好用的手机输入法在线所提供的素材和功...
8.5/1,398.8M
这是一款真实的钓鱼模拟类型手游,可玩性十分高,这是系列的第二部了,深海垂钓模拟在一个海上生存的模式,玩家在海上漂流,需要钓鱼才能活下来!游戏介绍《深海垂钓》是一...
9.9/1,197.8M
一款专为二次元准备的社交聊天软件,卟呤卟呤app汇聚各种领域的二次元信息,涵盖动漫、影视、游戏等ACG,二次元用户们可以在这里进行交流,寻找同好,卟呤卟呤app...
8.2/1,332.4M
闪瞬摄影攻略APP以“让每个人都能拍出心动瞬间”为理念,用专业内容与实用工具重构摄影学习场景。无论你是想提升朋友圈照片质感的生活记录者,还是立志成为摄影师的追梦...
8.1/1,278.8M
糖果管理器app,一款手机文件管理器,为用户带来了便捷的文件过滤、搜索建议等功能,还有多种功能等你来体验!赶快来试试吧!糖果管理器功能介绍糖果管理器是一款不错的...
8.5/1,925.6M
阿伟盒(杰歌不要)是一个新上线的搞笑语音盒子,这个是源自网络热梗阿伟杰哥的梗,不过这个也是一个不太好的事件,杰哥也被用指作坏人,这里有相关的搞笑语音,大家可以拿...
哈尔滨机关党建app下载-哈尔滨机关党建手机版1.0 苹果最新版
10.0/1,053.1M
哈尔滨机关党建最新的苹果版本正式的发布上线,这里是所有的党员最好的学习交流的地方,这里也是有很多的人需要最新的最新的党政相关的政策的!哈尔滨机关党建手机版功能哈...
lol代练段位价格计算器-英雄联盟新排位系统计算器1.1 官方最新版
9.1/1,970.2M
lol段位有不少的人都是需要找代练的,但是不知道现在段位的代练价格是怎么算的,想自己算清楚的话,可以试试下面的这款最新的英雄联盟新排位系统计算器,轻松的帮助你计...
魔兽争霸3王者斗道1.6正式版下载-王者斗道1.6最新正式版【附攻略】
9.4/1,326.3M
王者斗道是一款非常好玩的魔兽地图,小编为各位玩家带来魔兽地图王者斗道1.6正式版,还有精彩攻略等你来看,想要知道最新版的地图有哪些变化吗?快来下载体验吧!王者斗...
雷霆不朽之旅游戏下载-雷霆不朽之旅重生手游1.2.73安卓正版
8.1/350.2M
雷霆游戏官方打造的一款暗黑放置类挂机游戏,雷霆不朽之旅重生手游可以自由的选择职业和副职,还能自由的转职,丰富的装备,随机的属性支持,很不错的游戏体验。雷霆不朽之...
像素地球下载-EarthCraft(像素地球手游)2.5.0 安卓官方版
8.5/1,742.0M
像素地球手游是一款非常好玩的像素模拟方块类型游戏,类似于我的世界的玩法,可玩性十分高,你可以打造属于你自己的地球,建造各种动物,房子等等!像素地球手游介绍《像素...
e签宝工商登记平台app-e签宝工商登记平台1.0.0 官网手机客户端
7.7/1,566.3M
平时去工商登录要一大叠的文书资料,现在有了e签宝工商登记平台app,随时随地帮你快速完成签署,它是杭州天谷科技有限公司打造的e签宝工商登记版,使用简单,安全有效...