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

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

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

类型: 旅游服务 版本: V4.4

大小: 1,147.4 时间: 2025-11-17

推荐语
推荐语
威海市乐天体育公园 手机怎么买体育彩票WordPress视频播放插件Smartideo插件代码预览<?php/*PluginName:SmartideoPluginURI:http://www.fengziliu.com/Description:Smartideo是为WordPress添加对在线视频支持的一款插件(支持手机、平板等...
应用介绍

WordPress视频播放插件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>';

}

}

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

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

WordPress视频播放插件Smartideo怎么安装

WordPress视频播放插件(Smartideo)安装方法青春自护平安春节优秀作文下载-青春自护平安春节作文范文中英文双语版

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

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

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

WordPress插件安装方法

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

pc蛋蛋新开群 乐鱼体育产业a 胜游体育 博贝棋牌娱乐x 博尚棋牌
应用信息
相关版本
相关推荐
同一开发者
本类最新
相关专题
b/s物业管理系统-云梯端物业管理系统2015.8.1 绿色免费版

b/s物业管理系统-云梯端物业管理系统2015.8.1 绿色免费版

2025/11/01 11:43更新

云梯端物业管理系统是新型的智能b/s物业管理软件,里面涵盖了物业收费、催费、售楼、物管多功能于一体,还融合了办公系统,东坡带来的云梯端物业管理系统绿色免费版,简...

相关文章
用户评论
讨伐大魔王1.0.2完美破解下载-讨伐大魔王1.0.2破解版【破解vip+隐藏密码+攻略】

讨伐大魔王1.0.2完美破解下载-讨伐大魔王1.0.2破解版【破解vip+隐藏密码+攻略】

2025/10/15 04:39更新

魔兽防守地图讨伐大魔王1.0.2正式版更新了,此地图中有很多隐藏内容,玩家可以在里面探索到很多东西,还有隐藏道具等物品,最终的目的就是击败大魔王。讨伐大魔王1....

广电宽带 网友 xyzwap 废土故事游戏下载-废土故事游戏(Wasteland Story)2022.11.14a 安卓版
废土故事游戏下载-废土故事游戏(Wasteland Story)2022.11.14a 安卓版

支持 ( 32 ) 盖楼(回复)

广电宽带 网友 xyzwap 倩影江湖下载-倩影江湖游戏1.021 正式版
倩影江湖下载-倩影江湖游戏1.021 正式版

支持 ( 89 ) 盖楼(回复)

广电宽带 网友 xyzwap 浮点社区-浮点社区(社区小卖部软件)1.6 客户版
浮点社区-浮点社区(社区小卖部软件)1.6 客户版

支持 ( 93 ) 盖楼(回复)

广电宽带 网友 xyzwap 欧诗漫商城app下载6.0.0 手机版
欧诗漫商城app下载6.0.0 手机版

支持 ( 137 ) 盖楼(回复)

广电宽带 网友 xyzwap 书香苏州App下载-苏州图书馆2.47 手机版
书香苏州App下载-苏州图书馆2.47 手机版

支持 ( 87 ) 盖楼(回复)

广电宽带 网友 xyzwap GDR PC Tool下载-GDR PC Tool(影像档案管理软件)4.2 官方最新版
GDR PC Tool下载-GDR PC Tool(影像档案管理软件)4.2 官方最新版

支持 ( 62 ) 盖楼(回复)

广电宽带 网友 xyzwap Lumen5视频制作APP下载-Lumen5视频制作软件1.0 最新版
Lumen5视频制作APP下载-Lumen5视频制作软件1.0 最新版

支持 ( 171 ) 盖楼(回复)

广电宽带 网友 xyzwap 积目苹果版下载-积目app(照片弹幕社交)4.1.5 ios官网版
积目苹果版下载-积目app(照片弹幕社交)4.1.5 ios官网版

支持 ( 8 ) 盖楼(回复)

广电宽带 网友 xyzwap 九灵神域BT版下载-九灵神域BT版15.0变态版
九灵神域BT版下载-九灵神域BT版15.0变态版

支持 ( 169 ) 盖楼(回复)

广电宽带 网友 xyzwap 都市怪谈游戏下载-都市怪谈游戏1.0.5 安卓正版
都市怪谈游戏下载-都市怪谈游戏1.0.5 安卓正版

支持 ( 103 ) 盖楼(回复)

广电宽带 网友 xyzwap 微云链接直链转换工具1.0 免费绿色版
微云链接直链转换工具1.0 免费绿色版

支持 ( 43 ) 盖楼(回复)

广电宽带 网友 xyzwap musicolet音乐播放器汉化版-Musicolet Music Player6.5 build392 安卓版
musicolet音乐播放器汉化版-Musicolet Music Player6.5 build392 安卓版

支持 ( 12 ) 盖楼(回复)

广电宽带 网友 xyzwap 安安货运app司机版1.0.8 官方版
安安货运app司机版1.0.8 官方版

支持 ( 153 ) 盖楼(回复)

广电宽带 网友 xyzwap 字幕自动搜索下载器-字幕搜索下载小工具1.0 中文免费版
字幕自动搜索下载器-字幕搜索下载小工具1.0 中文免费版

支持 ( 79 ) 盖楼(回复)

广电宽带 网友 xyzwap 慧知家app下载-慧知家房产软件1.0 官方版
慧知家app下载-慧知家房产软件1.0 官方版

支持 ( 78 ) 盖楼(回复)

广电宽带 网友 xyzwap 英雄国度九游版下载-英雄国度九游版3.2 安卓最新版
英雄国度九游版下载-英雄国度九游版3.2 安卓最新版

支持 ( 113 ) 盖楼(回复)

广电宽带 网友 xyzwap MTK手机工具下载-MTK手机工具3.250 特别版
MTK手机工具下载-MTK手机工具3.250 特别版

支持 ( 40 ) 盖楼(回复)

广电宽带 网友 xyzwap maya2019破解版-Autodesk Maya 2019破解版简体中文版
maya2019破解版-Autodesk Maya 2019破解版简体中文版

支持 ( 101 ) 盖楼(回复)

广电宽带 网友 xyzwap 班会ppt下载-细节决定成败ppt(共24页)免费版【主题班会课件】
班会ppt下载-细节决定成败ppt(共24页)免费版【主题班会课件】

支持 ( 39 ) 盖楼(回复)

广电宽带 网友 xyzwap 恋爱物语湛蓝的回忆2.0.6 安卓最新版
恋爱物语湛蓝的回忆2.0.6 安卓最新版

支持 ( 16 ) 盖楼(回复)

查看更多评论

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

旅游服务 1,147.4

下载