您当前位置: 首页 休闲益智游戏 WordPress 视频插件-WordPress 视频插件(Smartideo)绿色免费版【附代码】

类型: 休闲益智游戏 版本: V8.6
大小: 1,977.0 时间: 2025-12-16





[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、华数、乐视等热门网站的视频。
WordPress视频播放插件(Smartideo)安装方法pubg小鳄鱼美化包下载-pubg小鳄鱼游戏插件神器1.2 最新版
你可以在后台插件管理页面中直接搜索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>';
}
}
最牛pk10 pp电子APP 万博娱乐外挂 微信打鱼上下分 乐鱼变成华体会
七悠雅思app-雅思口语素材(七悠雅思)2.2.4 免费版
814.8M
想要出国留学或深造雅思考试是必过的,今天东坡带来的七悠雅思app,是专为准备考雅思的朋友而打造,这里提供海量高质量英文原创素材,针对性的分为三个部分,帮助雅思考...
靓拍相机3.0 安卓最新版
782.7M
靓拍相机时刻展示出最美丽的自己,不管你拍出的是什么样子的照片到最后一定是最魅力的照片,如果你是喜欢在手机上拍照的话,就赶快使用靓拍相机把!靓拍相机亮点功能实时美...
凌梦锁机生成器下载-凌梦锁机生成器1.6 安卓版
1,195.0M
凌梦锁机生成器这款软件是网友自制的,是专为安卓手机用户打造的,软件界面简洁易懂,大家直接进入软件就可以了,需要什么功能就点击进入,软件都能为大家提供免费的服务。...
氢玩云游戏2022最新版免费版下载-氢玩云游戏2022最新版0.4.1 免费版
1,658.5M
氢玩云游戏2022最新版是一款有着丰富游戏类别的云游戏平台,各种热门游戏或者是冷门版本都可以在这里找到,满足所有玩家的需求,感兴趣的小伙伴快来东坡下载吧!氢玩云...
元宵节图片动图-2018元宵节快乐gif祝福说说图片微信朋友圈版
712.0M
2018元宵节到了,朋友圈都在晒元宵了,小编带来了元宵节图片gif动图,可以用来发微信朋友圈,配送祝福说说句子,可以给朋友送上祝福!元宵节图片动图2018狗年元...
鼎刷云店下载-鼎刷云店app7.2.0 安卓最新版
1,960.0M
这是一个店铺管家软件,分享邀请码还可以获得更多的红包,成为代理可以使用店铺助手功能,非常安全的一个平台,帮助你管理店铺。软件简介1、一个智能收款服务管理店铺软件...
电脑时间校对器下载-电脑时间校对器1.0 绿色版
1,476.8M
在当时你在用电脑工作时,总是会希望自己的时间是最准确的,这时就可以用电脑时间校对器,在最快的时间帮你校正错误的时间,而且操作相当简单,欢迎大家下载使用!电脑时间...
Origin2019b中文版-OriginPro 2019b简体中文版9.6.5.169 破解版
106.7M
OriginPro2019b是一款专业的数据分析绘图工具,Origin从8.0版本开始对程序的很多细节上做了更新和重组了,尤其是对数据拟合的功能做了优化和按键的...
小小厨房游戏下载-小小厨房游戏1.5.0安卓版
866.1M
小小厨房是一款好玩游戏的小游戏,非常适合小朋友们玩,可以让小朋友们体验厨房中的玩法,制作各种美食!软件介绍在小小厨房,你可以随心所欲!做一份薯塔,制一份沙拉,或...
自动喊话刷屏工具后台版1.0 绿色版
431.7M
自动喊话刷屏工具后台版是一款简单易于使用的游戏自动喊话工具。你只需要输入刷屏内容,设置刷屏速度后,即可开始后台喊话,非常的方便,软件不会假死刷个几天几夜都没问题...
世上英雄手游下载-世上英雄正式版1.0 安卓版
972.8M
世上英雄是一款像素风格的怀旧剧情向手游。游戏把背景设定在九十年代,丰富的游戏剧情,浸式自由探索,重现九十年代乡镇风貌。让你仿佛置身于那个时代,多种游戏模式,给你...
任性highspec汉化补丁下载-任性highspec游戏汉化包简体中文版
883.7M
任性highspec是一款日系风格的rpg文字恋爱游戏,这款游戏以恋爱为主题,丰富的故事情节,精致唯美的游戏场景,在游戏中你的选择将决定主人公的命运,为了让玩家...
旅游联盟链app下载-旅游联盟链2.3.4 最新版
676.8M
旅游联盟链是一款非常方便贴心的旅游服务平台,该平台上整理了非常丰富的全国各地旅游攻略,还可以在平台上直接预定酒店和门派,非常的方便快捷,无论你是自驾游还是想跟团...
三国英喵传(三国卡牌手游)2.1.7.0 官网最新版
702.8M
三国题材的手游现在有多少是大家喜欢玩的,现在还想玩玩这类的游戏的朋友就赶快来试试最新版本的三国英喵传,绝对让你感受到不一样的三国游戏!三国英喵传游戏简介三国英喵...
U盘魔术师V6特别版免费下载-U盘魔术师(U盘启动制作工具)V6 特别版
554.8M
U盘魔术师V6特别版是一款功能十分强大的U盘启动制作软件,主要针对移动设备、本机系统、光盘设备的PE系统的制作启动工具,非常的实用,欢迎有需要的朋友前来东坡下载...
智能教辅1.3.0.1 官网最新版
2025/10/17 22:47
画质兽助手下载-画质兽助手1.0.1 安卓版
2025/10/22 21:24
元气桌面主题hd免费下载-元气桌面主题hd壁免费壁纸软件1.6 安卓版
2025/10/16 12:28
书痴阅读软件下载-书痴阅读app1.1 安卓版
2025/10/17 01:45
萌嘟嘟表情包动态图无水印版
2025/10/20 10:05
铸剑折扣版下载-铸剑折扣版1.2.0.2 正式版
2025/10/01 18:27
美丽花园世界红包版下载-美丽花园世界红包版1.0 安卓版
2025/10/18 06:48
山猪百度贴吧转帖助手1.1 绿色免费版
2025/10/25 01:42
经纬相机水印app下载-经纬相机水印app1.0.0安卓版
2025/10/09 18:45
淘WiFi(淘宝免费WiFi)1.7.2 官网最新版
2025/10/15 01:33
叛乱袭击者夜鹰行动修改器-叛乱袭击者夜鹰行动全版本三项修改器+31.0 免费下载
2025/10/16 18:59
市中云报app下载官方版-市中云报app0.0.33 客户端
2025/10/19 12:39
91来电秀iPhone版2.5.1 越狱版
2025/10/21 06:02
凯云之窗app下载-凯云之窗物业平台1.1.2安卓版
2025/09/28 12:12
NBA2K16修改器-NBA2K16米奇妙妙工具1.3 绿色版
2025/10/06 19:20
NBA2K16修改器-NBA2K16米奇妙妙工具1.3 绿色版
2025/10/06 19:20更新
NBA2K16米奇妙妙工具是一款非常不错的NBA2K16游戏辅助工具。让你可以任意修改任务属性。有需要的可以来东坡下载使用!NBA2K16米奇妙妙工具说明NBA...
支持 ( 13 ) 盖楼(回复)
支持 ( 96 ) 盖楼(回复)
支持 ( 197 ) 盖楼(回复)
支持 ( 56 ) 盖楼(回复)
支持 ( 106 ) 盖楼(回复)
支持 ( 158 ) 盖楼(回复)
支持 ( 14 ) 盖楼(回复)
支持 ( 67 ) 盖楼(回复)
支持 ( 172 ) 盖楼(回复)
支持 ( 86 ) 盖楼(回复)
支持 ( 195 ) 盖楼(回复)
支持 ( 38 ) 盖楼(回复)
支持 ( 181 ) 盖楼(回复)
支持 ( 23 ) 盖楼(回复)
支持 ( 97 ) 盖楼(回复)
支持 ( 134 ) 盖楼(回复)
支持 ( 17 ) 盖楼(回复)
支持 ( 115 ) 盖楼(回复)
支持 ( 119 ) 盖楼(回复)
支持 ( 90 ) 盖楼(回复)