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

WordPress 视频插件-WordPress 视频插件(Smartideo)绿色免费版【附代码】

WordPress 视频插件-WordPress 视频插件(Smartideo)绿色免费版【附代码】

类型: 美妆护肤 版本: V2.2

大小: 1,411.6 时间: 2025-11-07

推荐语
推荐语
擦麻将的吉言 老游戏真人麻将WordPress插件安装方法[WordPress插件怎样安装WordPress插件安装方法] 在wordpress上播放在线视频要怎么设置呢?有了这款Smartideo视频插件就简单多了,它可以帮助你快速在wordpress添加在线视频,支持手机、平板的HTML5播放,它支持优酷、搜狐视频、土豆、...
应用介绍

WordPress插件安装方法

[WordPress插件怎样安装WordPress插件安装方法]

在wordpress上播放在线视频要怎么设置呢?有了这款Smartideo视频插件就简单多了,它可以帮助你快速在wordpress添加在线视频,支持手机、平板的HTML5播放,它支持优酷、搜狐视频、土豆、56、腾讯视频、新浪视频、酷6、华数、乐视等热门网站的视频。

WordPress视频播放插件Smartideo插件代码预览

<?php中公云学堂app1.1.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视频播放插件(Smartideo)安装方法

你可以在后台插件管理页面中直接搜索Smartideo并安装.

或者上传文件夹smartideo至/wp-content/plugins/目录.

在插件管理页面中激活Smartideo.

WordPress视频播放插件(Smartideo)怎么用

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

应用信息
相关版本
相关推荐
同一开发者
本类最新
相关专题
相关文章
用户评论
51狼人杀下载-51狼人杀手游1.0.7 安卓版

51狼人杀下载-51狼人杀手游1.0.7 安卓版

2025/10/23 00:19更新

狼人杀游戏可以很好的锻炼人讲话,今天小编带来的51狼人杀手游是一款日式英伦画风的在线轻社交游戏,还是经典的玩法,不过难度升级,万人在线竞技对战,最火爆的狼人杀交...

移动宽带 网友 abc456 令人窒息的操作表情包免费下载-令人窒息的操作表情包高清无水印版
令人窒息的操作表情包免费下载-令人窒息的操作表情包高清无水印版

支持 ( 114 ) 盖楼(回复)

移动宽带 网友 abc456 万马爱充软件5.0.9 苹果版
万马爱充软件5.0.9 苹果版

支持 ( 27 ) 盖楼(回复)

移动宽带 网友 abc456 准题库极速版下载-准题库极速版app4.85 安卓版
准题库极速版下载-准题库极速版app4.85 安卓版

支持 ( 65 ) 盖楼(回复)

移动宽带 网友 abc456 龙女战纪官方版下载-龙女战纪手游1.1 安卓最新版
龙女战纪官方版下载-龙女战纪手游1.1 安卓最新版

支持 ( 159 ) 盖楼(回复)

移动宽带 网友 abc456 虚拟高中女生生活模拟器中文版-Virtual High School Girl Life Simulator(高中虚拟女孩模拟器)2.0.1 最新版
虚拟高中女生生活模拟器中文版-Virtual High School Girl Life Simulator(高中虚拟女孩模拟器)2.0.1 最新版

支持 ( 147 ) 盖楼(回复)

移动宽带 网友 abc456 梦幻樱花少女模拟器游戏下载安卓版-梦幻樱花少女模拟器1.0 最新版
梦幻樱花少女模拟器游戏下载安卓版-梦幻樱花少女模拟器1.0 最新版

支持 ( 137 ) 盖楼(回复)

移动宽带 网友 abc456 Windows勒索病毒补丁包下载-Windows勒索病毒补丁最新版2017完整版【win7/win8/win10】
Windows勒索病毒补丁包下载-Windows勒索病毒补丁最新版2017完整版【win7/win8/win10】

支持 ( 63 ) 盖楼(回复)

移动宽带 网友 abc456 护士资格题库下载-护士资格题库11.0 安卓版
护士资格题库下载-护士资格题库11.0 安卓版

支持 ( 134 ) 盖楼(回复)

移动宽带 网友 abc456 海图地图下载器官方下载-海图地图下载器2.0.696 官方最新版【海图地形图下载器】
海图地图下载器官方下载-海图地图下载器2.0.696 官方最新版【海图地形图下载器】

支持 ( 83 ) 盖楼(回复)

移动宽带 网友 abc456 力声对讲机写频软件1.8.3 中文最新版
力声对讲机写频软件1.8.3 中文最新版

支持 ( 185 ) 盖楼(回复)

移动宽带 网友 abc456 超好玩魔盒手游魔盒2.2.2 官网最新版
超好玩魔盒手游魔盒2.2.2 官网最新版

支持 ( 165 ) 盖楼(回复)

移动宽带 网友 abc456 被窝视频聊天app下载-被窝视频聊天app2.4.1 安卓版
被窝视频聊天app下载-被窝视频聊天app2.4.1 安卓版

支持 ( 116 ) 盖楼(回复)

移动宽带 网友 abc456 王者之光末日求生1.1.0安卓版
王者之光末日求生1.1.0安卓版

支持 ( 140 ) 盖楼(回复)

移动宽带 网友 abc456 雪圈下载-雪圈app1.0.1官方安卓版
雪圈下载-雪圈app1.0.1官方安卓版

支持 ( 180 ) 盖楼(回复)

移动宽带 网友 abc456 万能遥控器电视遥控器手机版下载-万能遥控器电视遥控器app4.2 全机型通用版
万能遥控器电视遥控器手机版下载-万能遥控器电视遥控器app4.2 全机型通用版

支持 ( 181 ) 盖楼(回复)

移动宽带 网友 abc456 实况足球2016修改器-实况足球2016游戏功能选择器1.0 绿色版
实况足球2016修改器-实况足球2016游戏功能选择器1.0 绿色版

支持 ( 175 ) 盖楼(回复)

移动宽带 网友 abc456 听番FM官方网站正版下载安装-听番FM广播剧1.2.4 最新版
听番FM官方网站正版下载安装-听番FM广播剧1.2.4 最新版

支持 ( 144 ) 盖楼(回复)

移动宽带 网友 abc456 安心校车下载-安心校车系统app1.0.6 安卓最新版
安心校车下载-安心校车系统app1.0.6 安卓最新版

支持 ( 128 ) 盖楼(回复)

移动宽带 网友 abc456 Windows桌面管理
Windows桌面管理

支持 ( 18 ) 盖楼(回复)

移动宽带 网友 abc456 魔蛋智能app下载-魔蛋智能手机客户端1.5.9 官方安卓版
魔蛋智能app下载-魔蛋智能手机客户端1.5.9 官方安卓版

支持 ( 93 ) 盖楼(回复)

查看更多评论

WordPress 视频插件-WordPress 视频插件(Smartideo)绿色免费版【附代码】

美妆护肤 1,411.6

下载