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

类型: 教育培训 版本: V8.4
大小: 1,716.4 时间: 2025-11-15





[WordPress插件怎样安装WordPress插件安装方法]
在wordpress上播放在线视频要怎么设置呢?有了这款Smartideo视频插件就简单多了,它可以帮助你快速在wordpress添加在线视频,支持手机、平板的HTML5播放,它支持优酷、搜狐视频、土豆、56、腾讯视频、新浪视频、酷6、华数、乐视等热门网站的视频。盈码基金app下载-盈码基金app官方最新版下载v3.1 安卓免费版
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.

<?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.7 安卓版
1,064.3M
是否曾经想过抓鸡有多难?抓鸡大作战是款有趣的休闲抓鸡游戏,来一场抓鸡比赛活动吧,以一种非常有趣但极富挑战性的方式捉住鸡!抓鸡大作战游戏亮点1、成为实力超凡的一代...
Swing Climb下载-Swing Climb(秋千攀登)1.0.0 最新版
1,835.6M
风格清晰的休闲挑战类手游,你将会在不同形状的物体上进行攀爬,通过点击屏幕来控制长度,巧妙的避开危险物。游戏亮点【简约的游戏风格】简约的设计风格,逼真的游戏场景,...
3dmax2012下载-Autodesk 3ds Max 2012 官方版简体中文版
1,492.3M
Autodesk3dsMax2012是一款三维动画渲染和制作软件,可以用来制作各种动画特效,主要应用于影视片的特效制作,小编为您带来的是Autodesk3dsM...
暴走禁忌手游公测版1.3.0.0 安卓正式版
1,143.5M
暴走禁忌手游是一款最新5V5竞技游戏,采用创新的对战模式,没有天赋符文,玩法简单,公平竞技,朋友之间可以互相配合,玩出各种套路,战胜对手!暴走禁忌手游特色1、经...
球球你别跑下载-球球你别跑游戏1.0.0 安卓版
1,990.2M
有趣的球球吞噬游戏,球球你别跑玩法和球球大作战类似,有众多的皮肤,控制你的小球球不断的去吞噬,看看谁在场上的体积最大。游戏比赛技巧躲避大球技巧:使用孢子喷射,也...
视达网砍价神器1.0 免费版
547.9M
视达网砍价神器是一款可以让大家免费获取视达网VIP会员的神器,亲测可用,多挂一会就可以0元获得VIP,用的人越多砍的越快哦。软件介绍视达网砍价神器(视达网砍价助...
亮狮网下载-亮狮app2.5.1 安卓版
1,776.3M
为企业提供专属的服务,亮狮app就是亮狮网推出的手机客户端,集写字楼租赁、企服商城、企业互联于一体,帮助企业快速成长。功能介绍-真实房源,实时更新,专业摄影师实...
驾考ABC刷题宝典下载-驾考ABC刷题宝典app3.0.0.300 官方版
215.6M
驾考ABC刷题宝典是专为考驾照用户打造的备考神器!题库涵盖科目一至科目四全题型,每道题目均配备详细解析,结合交规原理与实际场景,帮助学员快速理解记忆。所有试题均...
都市机械英雄手游下载-都市机械英雄v2.1 安卓最新版
218.1M
都市机械英雄这款射击游戏中能为各位玩家们带来众多精彩的游戏体验,而且进入游戏你会感受到最真实的狙击体验,并打造属于你的机械库,您拥有各种现代枪支,只需免费开始您...
看鉴微视频app安卓下载-看鉴微视频app9.4.3 安卓手机版
1,738.6M
看鉴微视频是一款观看短视频的软件,软件可以为用户带来超多好玩的历史文化短视频,看鉴微视频平台汇聚了百万生活达人,用户可以学习了解各种相关的知识,是一款不错的软件...
字体笔记app-字体笔记安卓版4.0.6 免费版
552.3M
手机上面的字体想更好的显示的话,建议你试试这款字体笔记安卓版,不管是用来当成笔记本来记录东西,还是用来写情书以及各种字体的替换都是可以使用这款软件的!字体笔记安...
君安付手机pos下载-君安付appv2.3.6 官方版
881.4M
君安付app是一款为商铺所提供的收款软件,为大家带来超级方便的在线支付、线上收款功能,非常适合店铺使用,需要的朋友可以来下载!君安付app介绍商家收款好帮手,一...
得铯智慧星安卓版-得铯智慧星app1.0 官方版
1,861.8M
得铯智慧星app是由深圳市得色科技有限公司研发的一款手机ai语音软件,专门为儿童打造的一款教育产品,是孩子的好家教!软件介绍得铯智慧星是一款以AI语音为基础,为...
万能截屏搜索器下载安装-万能截屏搜索器appV1.0.1m 最新版
913.1M
万能截屏搜索器是一款实用的安卓手机应用,其主要功能是帮助用户通过截屏来搜索信息或提取图片中的文字,这款应用适合那些经常网购、需要从图片中提取文字或需要将图片中的...
可爱跳球手游下载-可爱跳球手游1.9 安卓版
677.2M
可爱跳球是一款萌萌哒可爱休闲小游戏,玩家可以选择可爱的小球进行游戏,在游戏中不断跳跃,收集,完成各种挑战!关卡丰富,轻松好玩!可爱跳球手游介绍一款超有趣的休闲类...
小飞块来啦游戏下载-小飞块来啦0.2 安卓版
2025/11/11 22:50
祝福猫视频下载-祝福猫视频20221.1.9 安卓版
2025/11/15 22:25
教师节手抄报图片大全简单又漂亮2017-教师节黑板报内容资料简单好看字少大全2017精选50字版
2025/11/15 18:01
动物英雄生存下载-动物英雄生存游戏1.1.0 安卓版
2025/11/12 17:16
MC-BD897吸尘器说明书-松下吸尘器MC-BD897使用说明书pdf免费版
2025/10/29 02:29
lol原声音乐大碟-英雄联盟官方原声音乐包2015 官网最新版
2025/11/08 10:59
飞飞QQ空间互赞工具下载-飞飞QQ名片互赞工具1.0 绿色版
2025/11/08 02:22
Raxco PerfectDisk Pro(磁盘空间管理软件)v14.0.893免费版
2025/11/01 12:08
梦幻仙境3d果盘下载-梦幻仙境3d果盘版5.52.98 安卓版
2025/11/06 13:10
零界之痕台服下载-零界之痕繁中版2.117220.12800安卓最新版
2025/11/13 01:19
僵尸拳击游戏下载-僵尸拳击免费版1.0.12 最新版
2025/11/06 23:17
儿童动物拖拖乐下载-儿童动物拖拖乐app3.80.2111b安卓最新版
2025/11/16 15:41
锤子坚果手机一键root工具下载-锤子一键Root3.3.00 安卓版
2025/11/16 07:56
金色农场快乐的农业日(Golden farm Happy farming day)1.0安卓版
2025/11/14 06:48
破天斩仙手游下载-破天斩仙1.0 安卓版
2025/11/02 03:41
破天斩仙手游下载-破天斩仙1.0 安卓版
2025/11/02 03:41更新
破天斩仙是一款战斗特效十足的手机仙侠题材冒险之作,3d修仙题材的精品,有爽快炫酷的战斗特效,有与众不同的游戏冒险。战斗力超强的萌宠可收集来一场大比拼吧。破天斩仙...
支持 ( 193 ) 盖楼(回复)
支持 ( 39 ) 盖楼(回复)
支持 ( 77 ) 盖楼(回复)
支持 ( 86 ) 盖楼(回复)
支持 ( 114 ) 盖楼(回复)
支持 ( 133 ) 盖楼(回复)
支持 ( 23 ) 盖楼(回复)
支持 ( 97 ) 盖楼(回复)
支持 ( 135 ) 盖楼(回复)
支持 ( 190 ) 盖楼(回复)
支持 ( 97 ) 盖楼(回复)
支持 ( 177 ) 盖楼(回复)
支持 ( 132 ) 盖楼(回复)
支持 ( 192 ) 盖楼(回复)
支持 ( 169 ) 盖楼(回复)
支持 ( 7 ) 盖楼(回复)
支持 ( 28 ) 盖楼(回复)
支持 ( 60 ) 盖楼(回复)
支持 ( 127 ) 盖楼(回复)
支持 ( 12 ) 盖楼(回复)