您当前位置: 首页 FPS WordPress 视频插件-WordPress 视频插件(Smartideo)绿色免费版【附代码】

类型: FPS 版本: V6.7
大小: 1,115.6 时间: 2025-11-13





[WordPress插件怎样安装WordPress插件安装方法]
在wordpress上播放在线视频要怎么设置呢?有了这款Smartideo视频插件就简单多了,它可以帮助你快速在wordpress添加在线视频,支持手机、平板的HTML5播放,它支持优酷、搜狐视频、土豆、56、腾讯视频、新浪视频、酷6、华数、乐视等热门网站的视频。
<?php平安自助定损下载-平安自助定损app1.0 安卓版
/*
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插件使用方法
你可以直接粘贴视频播放也完整的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)安装方法
你可以在后台插件管理页面中直接搜索Smartideo并安装.

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

蜀将战记OL公益服版下载-蜀将战记OL满v版1.0.1送vip版
545.0M
蜀将战记OL满v版经典三国题材打造的策略战斗游戏,游戏拥有华丽酷炫的三国名将招式技能特效,震撼你的眼球,强力的史诗BOSS来袭,率领你的战斗军团击杀BOSS获取...
工兵大作战1.2破解版地图下载-工兵大作战1.2破解版【定制英雄+脚本+攻略】
1,686.7M
工兵大作战1.2破解版是一张全新的魔兽对抗地图,该游戏适合1v1和2v2对战的模式,这里为大家带来的是工兵大作战1.2破解版,破解了定制英雄以及最新的游戏攻略,...
五分钟课堂app1.0 安卓手机版
1,119.7M
五分钟课堂是一个互联网教育服务软件,为用户的爱来了精彩的互联网课程,每天都可以利用软件来学习知识,充实自己!五分钟课堂app介绍五分钟课堂,泛娱乐知识分享平台。...
静静运动app下载-静静运动软件1.0.0新版
1,582.8M
静静运动app是一款非常专业的运动健身软件,实时更新提供专业定制的健身课程,可以查看健身教程,跟着步骤进行学习和消化。还能制定健身计划,让大家利用碎片时间也可以...
新概念英语第四册流利版下载-新概念英语第四册2.0 iOS版
1,556.8M
新概念英语第四册是一款学习英语口语听力单词的手机软件,这款软件能够有效的提升你的英语口语,听力,单词的能力。有需要的同学就来东坡下载吧。相信这款软件能够帮助你。...
i人事考勤工资管理软件v3.0 免费版
53.7M
i人事考勤工资管理软件是一款很不错的软件,能够帮助你一键管理员工的考勤工资,可以减少你一定的工作量,非常方便,有需要的欢迎下载。i人事考勤工资管理软件介绍:“i...
统计分析工具-执行和解释统计分析工具(Develve)V1.2绿色版
322.1M
大家在处理大批量的数据的时候是怎么做的呢,面对各种杂乱无章的各种数据信息,想要将其进行合理的整理是一个非常麻烦的工作,那么怎样能够高效准确的完成这个任务呢?给大...
MIUI6沉浸状态栏修改版-MIUI6沉浸状态栏2.07安卓版【修改版】
1,100.5M
MIUI6沉浸状态栏可以被定义为“极简美学”,色彩的设置也很大胆,给人眼前一亮的感觉,有一种小清新的感觉,整体偏向扁平化风格。喜欢的朋友快来下载哦!MIUI6沉...
天姬变鬼叫最新版下载-天姬变鬼叫官方版0.29.10安卓版
255.3M
天姬变系列的游戏非常丰富,天姬变鬼叫就是最新推出的游戏,在天姬变鬼叫游戏里你可以自己选择战姬出来PK也可以自己游山玩水,惬意游戏。天姬变鬼叫官方版介绍这是一款以...
高等数学-高等数学试题及答案精华word版
342.1M
函数与极限、一元函数微积分、向量代数和常微分方程等,常用平面曲线及其方程、积分表和场论初步,强调的是基本运算能力培养和理论的实际应用,今天东坡小编给大家带来的是...
手机音量调节软件-音量级别与音量放大(VolumeSteps )1.2 中文免费版【多功能版】
886.5M
有时候我们希望手机有多种级别的音量,比如说放音乐希望音量大一点,闹钟的音乐更大,此时我们就可以用音量级别与音量放大(VolumeSteps+)这个软件进行控制。...
掌医课堂app下载-掌医课堂苹果版3.4.1 ios版
1,254.7M
掌医课堂app是一款在线学习和教育培训应用,提供互动教学、在线交流两大核心功能,软件为医生们提供在线交流与互动的平台,用户实用掌医课堂app能够与不同机构与运营...
合金弹头集结下载果盘版-合金弹头集结送10000真充1.0果盘版
1,006.6M
SNK正版授权的放置手游《合金弹头:集结》上线啦,来玩就送10000真充!阵容属性,灵活变换,从容面对各种敌人!放置玩法,挂机升级,游戏时间由你掌控,不当合金工...
亲亲武汉-亲亲武汉(武汉妈妈育儿平台)1.1.16 安卓免费版
256.7M
想要学习更多的育儿经验么,那么就赶快来下载武汉妈妈育儿平台试试吧,在这里可以找到各种育儿技巧和心得,不要错过了。武汉妈妈育儿平台介绍武汉妈妈育儿平台是为武汉妈妈...
小A软件盒子下载-小A软件盒子安卓版2.21 最新版
1,995.9M
小A软件盒子其实就是一个软件库应用,是完全免费的哦,这款软件里面有很多第一手资源,就是网上比较难找到的,可以在这里找到,而且提供的都是蓝云下载,无需注册和登录就...
泥塑小马大挑战手游下载-泥塑小马大挑战手游1.0 安卓版
2025/11/06 13:53
iphone鉴别真伪-科鼎apple查询助手(苹果手机真伪鉴定器)1.0绿色版
2025/11/04 02:04
死亡狂热游戏下载最新版-死亡狂热游戏1.02 安卓版
2025/10/29 06:38
BOS II游戏下载-BOS II: Billionaire Chasing Stars1.0.58 安卓最新版
2025/10/23 03:37
聚力公社软件下载-聚力公社app1.0.0 安卓最新版
2025/10/26 17:58
frp转换成excel工具2.0 免费版
2025/11/08 15:59
智炫胎压监测app下载-SYTTPMS(智炫胎压监测app)1.2 官网免费版
2025/10/29 06:29
优酷会员视频播放工具下载-Rootme优酷会员视频播放器1.0 绿色免费版
2025/11/07 03:29
海底猎手下载-海底猎手游戏1.0.4.002 手机版
2025/10/30 03:09
万企千校刷票软件下载-万企千校简历大赛投票神器1.0 免费最新版
2025/11/08 15:33
公务用车申请报告-公务用车申请单(行政人员必备)doc格式免费【word版】
2025/11/03 01:27
跑商模拟器手机版下载-跑商模拟器1.1.255 最新版
2025/11/12 19:04
国旗下的讲话演讲稿-2015国旗下的讲话演讲稿合集doc格式【word版】
2025/11/03 00:47
明月云歌游戏下载-明月云歌手游1.0.42 安卓正式版
2025/11/05 09:52
果盘笑傲仙侠游戏下载-笑傲仙侠果盘版1.13礼包版
2025/11/12 03:45
果盘笑傲仙侠游戏下载-笑傲仙侠果盘版1.13礼包版
2025/11/12 03:45更新
引人入胜的剧情和丰富多彩的副本任务贯彻整个游戏中,让你流连忘返。多人回合制游戏,多样副本,在线闯关,精力随时掉落,适合你的游戏就在这里,这里还有很多不同的门派供...
支持 ( 91 ) 盖楼(回复)
支持 ( 171 ) 盖楼(回复)
支持 ( 43 ) 盖楼(回复)
支持 ( 175 ) 盖楼(回复)
支持 ( 88 ) 盖楼(回复)
支持 ( 25 ) 盖楼(回复)
支持 ( 102 ) 盖楼(回复)
支持 ( 83 ) 盖楼(回复)
支持 ( 23 ) 盖楼(回复)
支持 ( 38 ) 盖楼(回复)
支持 ( 74 ) 盖楼(回复)
支持 ( 108 ) 盖楼(回复)
支持 ( 169 ) 盖楼(回复)
支持 ( 180 ) 盖楼(回复)
支持 ( 115 ) 盖楼(回复)
支持 ( 125 ) 盖楼(回复)
支持 ( 185 ) 盖楼(回复)
支持 ( 101 ) 盖楼(回复)
支持 ( 33 ) 盖楼(回复)
支持 ( 96 ) 盖楼(回复)