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

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

大小:426.1M 语言: 西班牙语

类型:沙盒建造游戏 系统:macOS

备案号:备案号:浙9L-201937958-61E
简介 相关 评论(8)
热门游戏 竞技游戏 枪战游戏 枪械游戏大全

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

WordPress视频播放插件(Smartideo)安装方法小王壁纸软件下载-小王壁纸库3.0.0 安卓版

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

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

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

WordPress插件安装方法

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

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

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)怎么用

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

艾尚体育网址 11选5投注器 双色球机选复试 双色球红球小号 手机吉祥坊
展开全部
应用信息
用户评论 跟帖评论

热门评论

最新评论

2025/12/16 23:39
KPOPTilesDeluxe2023,这游戏非常好玩,只是有时候音调比较没有还原度。歌曲很多,而且也不用更新超棒的!对手残者很友好只要左上角是绿的哪怕你丢了一...

支持( 62 ) 盖楼(回复)

2025/12/16 09:40
SparkleCam,bulingbuling特效相机神器,你可以定期的照片和视频,把最基本的、最不起眼的物体和景象为光荣的闪闪发光的奇迹。SparkleCam...

支持( 196 ) 盖楼(回复)

2025/12/12 12:10
盗墓笔记是一款非常好玩的冒险类手游相信有不少人都是喜欢玩的,现在为大家带来盗墓笔记终极版,游戏的玩法还是非常的好玩的,感兴趣的可以试玩哦!盗墓笔记终极版手游阵法...

支持( 34 ) 盖楼(回复)

2025/12/18 09:20
天空战记是一款全新的魔兽地图,游戏是在空中进行打飞机,好比于空中飞机大战,直接就能在魔兽地图中就可以开始玩,喜欢的朋友快来下载吧!地图信息地图名称:天空战记正式...

支持( 106 ) 盖楼(回复)

2025/12/16 06:03
在武汉的朋友都是知道的,现在交通比以前好了一些但是还是非常的堵的,想打的的话,还是非常的麻烦的,现在小编就给你介绍下面的这款武汉打车软件来帮助你!武汉打车软件介...

支持( 59 ) 盖楼(回复)

2025/12/01 21:05
专业的美术教育服务平台,分享了很多精品的课程内容,优秀老师的教学视频,书法、国画、素描等,培养孩子的艺术天分,领略艺术的独特魅力。人美美育课堂介绍人美美育课堂以...

支持( 142 ) 盖楼(回复)

2025/12/21 23:05
小职了电脑版是一款手机求职软件,软件100%覆盖全部网站+报纸+现场+校园+猎头,500城市全覆盖,需要的网友快来下载吧!小职了电脑版软件简介-智能手机的普及,...

支持( 169 ) 盖楼(回复)

2025/12/22 12:47
蜜芽宝贝以“进口母婴品牌”为定位,以“限时特卖”为模式,蜜芽宝贝本质上是一家垂直行业的B2C网站,以限时折扣的模式销售进口母婴品牌的产品。需要购物的朋友可以考虑...

支持( 86 ) 盖楼(回复)

2025/12/08 20:09
弹弹堂一直都是大家的童年回忆,以此为基础的游戏也很多,但是我们依然坚持着重现经典信念给大家带来这款小小飞弹;自动挂机功放飞玩家双手,丰富的养成系统,我们不止重现...

支持( 100 ) 盖楼(回复)

2025/12/21 10:50
K-LiteCodecTweakTool是一款绿色安全,界面清爽友好,操作方便好用,功能强大完善,完全免费的解码器和过滤器关联检查工具。解码过滤器检查工具有什么...

支持( 117 ) 盖楼(回复)

2025/12/20 10:49
这款软件是走路红包赚钱app,通过走路可以轻松获得佣金,随时随地帮助你轻松赚钱哦,软件红包似乎很多的,只要你满足0.3元就可以获得佣金,软件红包福利是很多的,随...

支持( 28 ) 盖楼(回复)

2025/12/22 18:58
这是一款优惠购物软件,通过这个平台你可以找到各种商品,提供各种优惠券领取,在这里你可以买到各种居家,餐厨,鞋包配饰,洗护品等等!软件介绍优信贝全品类App,品类...

支持( 97 ) 盖楼(回复)

2025/12/08 14:52
微信小游戏上很火的一款休闲策略手游,这里出来单独的手机版本游戏了,如果不想下载的话也可以直接打开微信搜索这个小游戏,在微信上玩也是可以的,轻度休闲策略,一起塔防...

支持( 126 ) 盖楼(回复)

2025/12/12 17:44
魔力宝贝新世界手游是一款大型多人冒险游戏,将在新法兰王国进行,收集各宠物图鉴,在新法兰城采集、制药、伐木、挖矿等各种玩法,还有全新社交系统,邀请好友加入队伍,一...

支持( 101 ) 盖楼(回复)

2025/12/13 16:31
专门为小朋友打造的拼音学习软件,熊孩子拼音app提供了丰富的内容,通过动画的形式去学习,画面精美内容新奇百看不厌。熊孩子拼音app介绍专为2-8岁孩子定制,遵从...

支持( 75 ) 盖楼(回复)