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

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

[WordPress插件怎样安装WordPress插件安装方法]
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
在wordpress上播放在线视频要怎么设置呢?有了这款Smartideo视频插件就简单多了,它可以帮助你快速在wordpress添加在线视频,支持手机、平板的HTML5播放,它支持优酷、搜狐视频、土豆、56、腾讯视频、新浪视频、酷6、华数、乐视等热门网站的视频。牛x电影搜索神器-万能电影搜索神器1.0 免费最新版
<?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>';
}
}
展开内容
阿强送快递游戏正版下载-阿强送快递游戏1.1.8 红包版
泸州通app下载-泸州通app3.0.1 安卓版【泸州本地生活服务平台】
权力与纷争体验服下载-网易权力与纷争激活码版1.5.12 安卓最新版
决斗之城百度版下载-决斗之城手游百度版1.7.7安卓版
疯狂鹿哥模拟器下载-疯狂鹿哥模拟器安卓版1.0 安卓版
我是技能大师游戏下载最新版-我是技能大师1.0.7 安卓版
PyCharm 2.7.4下载-JetBrains PyCharm 2.7.4官方版附注册码
奥特曼传奇英雄官方服下载-奥特曼传奇英雄官方最新版29.0.0 官服版
分贝测试仪软件下载-分贝测试仪app1.3.1 安卓手机版
剑出鞘恩怨了无限资源版下载-剑出鞘恩怨了折相思免广告1.0.2 安卓版
萌娘契约ios下载-萌娘契约苹果官网版1.4.9 官网苹果最新版
天狗生态app下载-Cops天狗app1.0.7 安卓手机版
玺品下载-玺品app3.0.1 手机版
小米换机app下载-小米换机助手4.3.5 最新版
诛仙恋bt版下载-诛仙恋变态版1.0bt版
8.7/520.5M
英雄就是我是一款非常好玩的格斗类游戏,这款游戏的画风有点像素类,而且看起来有点像是儿时玩过的热血快打,不过在画面上面更加显得不一样,现在为大家带来英雄就是我破解...
htc手机说明书-HTC ChaCha(恰恰)使用手册pdf格式中文指南
8.6/526.7M
HTCChaCha(恰恰)是HTC在2011MWC大会上发布的新品,该机市场的定位,是专门为那些经常使用Facebook,qq等社交服务的用户而设计的。本节内容...
8.0/1,793.7M
最近微博上夏之光模仿李佳琦的新闻又火了,幽默的视频受到了非常多网友的关注,今天为大家带来夏之光图片高清壁纸,精选优质高清写真壁纸,欢迎下载。夏之光图片高清壁纸素...
8.5/759.0M
演出经纪人题库app是一款经纪人学习软件,包含了各个地区的经纪人必备的相关知识,帮助用户成为一个合格的经纪人。演出经纪人题库app介绍上学吧演出经纪人题库是一个...
9.4/1,024.3M
家中的宠物在叫也不知道需要什么,逗逗宠物翻译器app就是一款猫狗互动交流软件,在线进行翻译,无缝交流,宠物的喜怒哀乐尽在掌握。逗逗宠物翻译器介绍猫咪不愿意亲近人...
9.7/1,014.5M
海南易游app是一款专为去海南旅游的用户打造的海南导游软件,为用户提供海南160多个景区语音导览讲解、海南景点、海南美食、订机票、订景区门票、住宿酒店等服务,让...
查看
9.3/1,877.1M
魔法来袭是一款魔幻手游,游戏采用的视觉,强大的世界地图,强大的神兽坐骑,玩家可以自由捕捉,酷炫的技能角色,刺激的魔幻剧情,三大种族,游戏幻想,为光明赠送超多的f...
车辆工程专业介绍课件ppt-车辆工程专业未来发展与就业情况介绍ppt模板免费下载
8.9/1,541.0M
又到了高考生填自愿的时候了,选择一个感兴趣的专业非常重要,对于想要学习车辆工程专业的朋友们,这里东坡小编分享一份车辆工程专业未来发展与就业情况介绍ppt模板,让...
9.6/732.3M
虚空济app为大家去解读中国的传统文化,通过了丰富的视频课程,还有直播,课程分类非常的详细,线下也会组织活动,喜欢中国文化的朋友值得拥有。虚空济是什么虚空济秉承...
8.6/257.4M
作为一个火车站调度员,你要很好的协调乘客,车站2汉化版考验玩家的协调能力,火车可以做200人,合理的进行调度,完美的完成任务。游戏攻略在右上角可以看到接下来进站...
惊雷喊麦表情包gif动图大全-MC惊雷表情包2020完整高清版动图
9.4/781.5M
惊雷喊麦表情包是抖音上很火的一首歌,最近很多小伙伴们都被他洗脑了,搞笑又不是气质,今天小编给大家整理了完整版的动态图片。惊雷喊麦表情包图片大全亮点1.不会唱或者...
7.7/1,609.2M
专业的艺术培训平台,爱培艺app有着精选的学习资源,支持内部学习资源共享,丰富的学习场景和快速测试学习群组,为用户带来丰富有趣的学习环境。功能特色1、精选学习资...
可爱猫咪护理游戏修改版-CatDays(可爱猫咪护理游戏)1.0.21 安卓最新版
9.0/645.0M
可爱猫咪护理游戏(CatDays)是一款卡通风格的猫咪养成游戏,玩家先领养猫咪,然后玩消除游戏获得金币去为你的猫咪买食品、装饰物,画面玩法很有趣味,欢迎免费下载...
9.4/1,027.0M
地主送红包是一款玩起来非常有意思的红包手游,在游戏中玩家可以体验到各种趣味玩法模式,游戏中领取的现金红包全部都是可以直接提现的,感兴趣的小伙伴快来东坡下载吧!地...
7.6/1,048.6M
青云传重制版是一款超级好玩的修仙战斗rpg手游大作。游戏有着丰富的玩法内容,精美的画面风格。无敌萌宠坐骑相伴,玩家可以选择喜欢的职业加入战斗进行pk,全地图抢B...
8.3/1,885.8M
快乐钢琴APP是一款钢琴学习软件,专为拥有基础以及没基础却想要学习钢琴的用户设计,对于没有任何基础的用户来说这是一个学习钢琴的神器,系统提供最全面的入门知识供用...
7.6/158.6M
微博少一组中华田园猫的表情图片火了,奇丑无比的中华田园猫图片,配上逗比的动作姿势,简直丑到爆!小编带来了中华田园猫表情图片,欢迎来下载!中华田园猫图片中华田园猫...
花样小视频app下载-腾讯花样小视频app1.0.0 官方安卓版
9.0/1,924.2M
花样小视频app是腾讯官方打造的一款小视频软件,这里分享了精彩的小视频,各种搞笑小视频,也可以自己进行拍摄,分享精彩瞬间。花样小视频app使用方法使用qq或者微...
DWG Trueview 2018 64位官方下载-Autodesk DWG Trueview 2018 64位官方完整版
9.5/584.5M
AutodeskDWGTrueview2018是Autodesk公司打造的一款CAD图纸查看软件,支持DWG、DWF和DXF文件查看,查看DWG文件或将其转换为...
9.2/163.8M
辣么值是那种没有中间商赚插件的手机购物app,为消费者呈现优质好物。都是透明的交易,利润信息都公开了,保证了我们的利益。辣么值应用介绍辣么值是国内倡导公开商品成...
苍海贴吧抢楼神器(贴吧自动抢2楼3楼工具)v1.4 绿色特别版
10.0/1,500.5M
有时候看见别人抢二楼很快,非常羡慕,不过要是手动抢的话,还非得守着贴吧刷新,在这小编给您介绍一款苍海贴吧抢楼神器,帮助你快捷自动抢二楼三楼,让你先人一步抢到沙发...
9.8/686.7M
现在很多的朋友都是需要在自己的手机上使用一些不错的幻灯片的,那么现在小编就给你介绍下下面的这款手机上的幻灯片--Google幻灯片!使用Google幻灯片,让你...
8.0/1,036.3M
全面战争战锤2风灵月影修改器,一款由3DM风灵月影制作分享的全面战争战锤2修改器,需要的玩家们赶紧来下载吧。使用方法数字键1-无限资金数字键2-军队&英...
7.9/860.4M
这款软件是一款以营销为特色的软件,不管你是什么职业,都是可以在上面找到你想要推广的产品,软件有着众多不同的模式可以查看,让营销变得简单起来!云端...