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

类型: 语言学习 版本: V1.4
大小: 652.0 时间: 2025-11-07





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

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

Simulation Mechanical 2015破解版下载-Autodesk Simulation Mechanical 2015中文破解版64位附注册机
1,362.6M
SimulationMechanical2015是一款机械仿真工具,可以帮助用户在制造流程前面提前预测产品性能,还支持和大多数cad软件进行关联交换数据,只需使...
爱意送礼神器下载-推荐送礼物的app(爱意app)2.3.1 官网最新版
80.7M
爱意送礼神器是一款为您推荐礼品的手机app,逢年过节,总会为自己在意的人送上一份礼品来表达自己的情谊,这款软件帮你找到贴心礼物,欢迎来下载使用! 礼品...
酷铃音下载-酷铃音app1.8.9安卓最新版
1,165.8M
简单好用的制作铃声和动态壁纸神器,无需连接电脑,海量铃声和壁纸资源可供选择,赶快来下载,让您的手机更具有活力~有了这款手机铃声制作神器,人人都有专属的个性手机铃...
万圣节大作战2五项修改器1.0 h4x0r版
658.1M
万圣节大作战2是一款有很多玩家朋友们都在玩的游戏。万圣节大作战2万圣节大作战2五项修改器1.0DX11支持DX11,为1.0版本制作,使用时先运行游戏,再启动修...
华为充电音效app下载-华为自定义充电音效软件1.0.0 免费版
1,599.8M
你的手机设置了充电音效吗,想不想像抖音上的那些用户一样为你的安卓机自定义一个充电音效呢,这款华为自定义充电音效软件是一个非常好用的工具,自带很多热门的音效可以选...
数据恢复软件(Aidfile)3.67 绿色免费版
1,937.5M
文件误删了怎么办呢?误删了有专门的文件数据恢复类软件可以帮助找回被删的文件。Aidfile数据恢复软件(免费硬盘数据恢复工具)是一款超级给力的硬盘数据恢复工具。...
readiris pro 12破解版下载-readiris pro 12(orc文字识别软件)中文破解版【附破解教程】
1,372.0M
readirispro12(文字识别)是一款光学识别OCR软软件,可以把纸张、PDF文件、图片文件扫描成可以编辑的文字,然后用你喜欢的编辑器进行编辑,支持高达几...
Acrobat XI Pro 11苹果电脑破解版下载-Adobe Acrobat XI Pro for Mac版11.0.23 官方正式版【附注册机破解教程】
140.2M
AdobeAcrobatXIProforMac版是一适用于苹果电脑的一款功能强大的pdf编辑转换工具,东坡这里附上的是官方最新AdobeAcrobatXIPro...
美少女101手游3.0.1 最新版
1,017.0M
美少女101是一款次元卡牌对战类游戏。游戏含有丰富的剧情和刺激战斗玩法,玩家可以通过挑战进行升级并获得大量道具装备。游戏自带挂机脚本,一键开启挂机,轻松升级。游...
乱斗乾坤OLbt服-乱斗乾坤OL1.6.535礼包兑换码
65.7M
乱斗乾坤OL是一款仙侠风的三国策略卡牌玩法的游戏,游戏有着非常多精致立体的角色,我们要在游戏中招兵买马,建造最强军队,这里将会由你主宰,不一样的三国世界等你来体...
老虎签证app下载安装-老虎签证手机客户端1.0.0 安卓版
1,877.6M
现在出国都是需要各种各样的申请资料,同时也是需要一些特殊的平台才可以支持的,在现在就可以直接的使用下面的这款老虎签证app解决这些问题!老虎签证特色功能【在线填...
photoshop2022下载-photoshop2022中文直装版23.3.2.458 免费版
283.0M
photoshop2022最新版本已经更新到23.3.2版本,许多网友都已经更新,该版本功能更强大,有很多改进和新增的内容!本站为您带来了photoshop20...
奇点工具箱下载安装-奇点工具箱app1.0.0.1 安卓版
1,880.5M
奇点工具箱是一款资源非常丰富的网络社区,在这里大家能下载到各种类型的实用工具和娱乐软件,也能获取海量文件资源,帮助大家解决各种难题,免费观看电影电视动漫,免费使...
英语四级词汇app下载-英语四级词汇app12.1.0 安卓最新版
899.7M
英语四级词汇app是一款学习英语四级词汇的手机软件,为您提供最实用的英语四级词汇,帮助你轻松学习,欢迎来下载!英语四级词汇应用简介大学英语四级考试,英文全称Co...
小看板网页版-小看板(协同办公app)2.2.2 官方最新版
1,679.5M
移动办公的流行也是让更多的团队都是开始使用一些协同办公app了,小看板就是这类型软件中比较好用的,当然也是很多的人都是非常的需要的一款不错的办公软件!小看板(协...
Vista彩色文件夹V2.0 纯净安装版
2025/10/27 07:48
ARM DS-5 调试器说明书-ARM DS-5 调试器使用手册v5.16 pdf格式【原版】
2025/11/07 05:10
云流迅雷VIP获取工具v1.0 绿色免费版
2025/10/16 16:49
win7桌面记事本软件下载-电脑记事本软件(秋天记事本)2.5 绿色免费版
2025/11/09 18:32
广告设计app下载-云川广告设计21.10.09 手机版
2025/10/26 20:22
wifi热点软件下载-wifi热点软件(My WIFI Router)v3.0.64 官方版
2025/10/21 01:29
叛逆机械师五项修改器下载-叛逆机械师五项修改器免费版
2025/10/27 23:47
科鼎QQ控制台(QQ远程控制软件)1.5.0.2 绿色免费版
2025/10/16 04:04
快递单号生成器破解版-名优快递单号生成器3.3 官方版
2025/11/03 09:23
手机ui模板psd下载-手机UI 界面设计素材psd模板免费版
2025/10/27 07:55
未来课堂软件官网下载-未来课堂ios版2.11.1苹果版
2025/10/24 10:14
网站psd模板下载-绿色环保建材网站首页psd模板【高清分层】文件免费下载
2025/11/02 14:15
爱普生EB-440W说明书-Epson爱普生EB-440W投影仪使用手册pdf格式用户指南
2025/11/04 14:51
亿愿批量验证检测网址链接有效性下载-亿愿批量验证检测网址链接有效性软件1.2.422 官方最新版
2025/11/03 09:57
巨盾精美壁纸1.0 绿色版
2025/10/20 03:14
巨盾精美壁纸1.0 绿色版
2025/10/20 03:14更新
新的一年里,你的电脑有什么改变了,想要改变那就从电脑的桌面壁纸开始吧,下载一款好用的桌面壁纸软件,帮助你更好更快的更换电脑的壁纸!巨盾精美壁纸介绍巨盾出品高清精...
支持 ( 24 ) 盖楼(回复)
支持 ( 168 ) 盖楼(回复)
支持 ( 195 ) 盖楼(回复)
支持 ( 110 ) 盖楼(回复)
支持 ( 23 ) 盖楼(回复)
支持 ( 24 ) 盖楼(回复)
支持 ( 107 ) 盖楼(回复)
支持 ( 33 ) 盖楼(回复)
支持 ( 98 ) 盖楼(回复)
支持 ( 44 ) 盖楼(回复)
支持 ( 45 ) 盖楼(回复)
支持 ( 175 ) 盖楼(回复)
支持 ( 83 ) 盖楼(回复)
支持 ( 54 ) 盖楼(回复)
支持 ( 90 ) 盖楼(回复)
支持 ( 177 ) 盖楼(回复)
支持 ( 193 ) 盖楼(回复)
支持 ( 139 ) 盖楼(回复)
支持 ( 178 ) 盖楼(回复)
支持 ( 74 ) 盖楼(回复)