WordPress 视频插件-WordPress 视频插件(Smartideo)绿色免费版【附代码】手游最新版本

WordPress 视频插件-WordPress 视频插件(Smartideo)绿色免费版【附代码】手游最新版本

大小:1,177.0M 语言: 西班牙语

类型:理财工具 系统:macOS

备案号:备案号:京8W-200823325-49U
简介 相关 评论(9)
热门游戏 竞技游戏 枪战游戏 枪械游戏大全

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

<?php幸吧社交下载-幸吧社交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插件安装方法

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

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.

展开全部
应用信息
用户评论 跟帖评论

热门评论

最新评论

2025/10/26 08:36
端午节ppt素材适用于节日庆典的演讲,加深大家对传统节日的喜欢,传播中国文化有很大的帮助,是一个真正好用免费而且精美的模板,有需求就快来下载吧。端午节ppt素材...

支持( 114 ) 盖楼(回复)

2025/11/01 08:59
Win1015052SDK更新工具已经正式的出来的,现在为大家带来Win10SDK15052下载,你可以通过该工具修复更新多个内容,需要的可以使用!Win10创...

支持( 90 ) 盖楼(回复)

2025/10/22 14:04
漫威旗下的人物钢铁侠相信已经深深地烙在人们的心中,为大家带来钢铁侠高清桌面壁纸,精选优质高清大图,快来下载炫酷的钢铁侠壁纸吧。钢铁侠高清桌面壁纸素材钢铁侠简介托...

支持( 113 ) 盖楼(回复)

2025/10/17 08:58
b2b行业网站源码行业贸易商务门户网站系统正式版现提供下载了,应用我们这一套程序,完全可建立一个如阿里巴巴一样全球领先的B2B电子商务网上贸易平台的网站系统,有...

支持( 22 ) 盖楼(回复)

2025/11/09 18:14
我们平时生活中经常需要用到密码,但是需要密码的多了后容易记混或者记错,那么一个好用的密码管理软件是非常重要的,Enpass密码管理工具就是一个非常好用的免费软件...

支持( 43 ) 盖楼(回复)

2025/11/07 09:50
龙之谷破晓奇兵是一款魔兽最新上线的防守地图,小编为大家带来龙之谷破晓奇兵1.0正式版,新版地图支持1-8人对战,游戏中,分为光暗水火风气等6种属性,都与技能伤害...

支持( 190 ) 盖楼(回复)

2025/10/17 03:21
数字照片传送工具WIA-Loader是一个体积小巧使用方便的数字照片传送工具,可以将数字相机里的照片传送到电脑中。它支持修改文件名称,输入或设定日期和时间格式,...

支持( 92 ) 盖楼(回复)

2025/11/09 15:40
唯美小清新庆典ppt模板是小编为大家分享的一套可以让你快速的找到自己需要的模板的资源,可以让你用在各种庆典上,需要的下载吧。预览:说明:不是王子,没有公主的关注...

支持( 20 ) 盖楼(回复)

2025/10/28 09:28
这是一款综合性汽车服务软件,在一路可行app中有违章查询、汽车维修、汽车保养、汽车估价等功能,车主用户可以使用这款软件即可搞定一切哦,有需要的下载使用吧。一路可...

支持( 87 ) 盖楼(回复)

2025/10/31 01:48
头像表情鸭软件,一款表情包的头像,这款软件里有一些有趣可爱的表情包,让你以后斗图也能够变得更加的欢乐,所以说大家可以来这里轻松下载体验哦,享受到更多快乐的斗图交...

支持( 180 ) 盖楼(回复)

2025/11/06 07:24
沪江开心词场是一款由沪江网推出的英语学习软件,用户通过本软件能够便捷的学习英语,本软件支持随时背单词、听写单词、练习发音、场景练习、对话练习等等,对于学习英语的...

支持( 145 ) 盖楼(回复)

2025/10/31 13:58
相信许多淘宝新手卖家对于怎么快速提升信誉和销量都非常烦恼,这里给您介绍一款捷易淘宝批量下单软件,可以批量下单,帮助你全自动刷淘宝信誉和销量,支持自动换IP,使用...

支持( 60 ) 盖楼(回复)

2025/10/17 05:26
游戏介绍  《死亡地下城,DeadDungeon》是由AlexeyRoenko制作发行的一款动作闯关游戏,有着简洁的图形风格和具有挑战性的关卡,是传统的硬核2D...

支持( 36 ) 盖楼(回复)

2025/11/05 02:14
当母亲节遇上护士节,为这群可爱的人送去一份温暖吧!护士是我们的白衣天使,纯洁的心灵、高尚的情操,再苦再累也会报以微笑和祝福,在平凡的岗位上默默奉献,白班夜班颠倒...

支持( 175 ) 盖楼(回复)

2025/10/20 19:53
这是一款为了防止您的电脑免受恶意攻击,将电脑中的eDellRoot证书和DSDtestProvider的自签名根证书卸载的工具。有需要的可以来东坡下载使用!戴尔...

支持( 100 ) 盖楼(回复)