您当前位置: 首页 健康医疗 WordPress 视频插件-WordPress 视频插件(Smartideo)绿色免费版【附代码】

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

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

类型: 健康医疗 版本: V10.6

大小: 1,057.3 时间: 2025-11-08

推荐语
推荐语
123开奖独家提供 三d的开奖号WordPress插件安装方法[WordPress插件怎样安装WordPress插件安装方法]拉手离线地图app下载-拉手离线地图手机版1.9 安卓版 WordPress视频播放插件(Smartideo)怎么用Smartideo插件使用方法你可以直接粘贴视频播放也完整的URL到编辑器(单独一行),就...
应用介绍

WordPress插件安装方法

[WordPress插件怎样安装WordPress插件安装方法]拉手离线地图app下载-拉手离线地图手机版1.9 安卓版

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插件代码预览

<?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视频播放插件(Smartideo)安装方法

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

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

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

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

应用信息
相关版本
相关推荐
同一开发者
本类最新
相关专题
相关文章
用户评论
Crazy Ring免费版下载-Crazy Ring铃声制作软件1.1.2 PC绿色中文版

Crazy Ring免费版下载-Crazy Ring铃声制作软件1.1.2 PC绿色中文版

2025/11/05 01:54更新

CrazyRing铃声制作软件是一款可以帮助你制作出非常完美的铃声制作软件,你想要什么专业级的铃声使用它都可以给你制作出来,包括苹果手级和安卓手机的铃声,自带专...

联通光纤 网友 zavbib 2020国庆中秋双节快乐动图下载-2020国庆中秋双节快乐动图表情包完整免费版
2020国庆中秋双节快乐动图下载-2020国庆中秋双节快乐动图表情包完整免费版

支持 ( 29 ) 盖楼(回复)

联通光纤 网友 zavbib 小伯辅导在线学习软件下载-小伯辅导app1.1.081安卓版
小伯辅导在线学习软件下载-小伯辅导app1.1.081安卓版

支持 ( 70 ) 盖楼(回复)

联通光纤 网友 zavbib 搜歌音乐盒-搜歌音乐盒1.0 安装版
搜歌音乐盒-搜歌音乐盒1.0 安装版

支持 ( 94 ) 盖楼(回复)

联通光纤 网友 zavbib 战魂铭人小米礼包版下载-战魂铭人小米版1.8.2渠道首发版
战魂铭人小米礼包版下载-战魂铭人小米版1.8.2渠道首发版

支持 ( 173 ) 盖楼(回复)

联通光纤 网友 zavbib 小巧票据打印管理软件下载-小巧票据打印管理软件3.1 绿色免费版
小巧票据打印管理软件下载-小巧票据打印管理软件3.1 绿色免费版

支持 ( 115 ) 盖楼(回复)

联通光纤 网友 zavbib mc-8d58d说明书-松下mc-8d58d吸尘器说明书pdf免费版
mc-8d58d说明书-松下mc-8d58d吸尘器说明书pdf免费版

支持 ( 43 ) 盖楼(回复)

联通光纤 网友 zavbib krita安卓平板下载-krita安卓版5.1.5 官方版
krita安卓平板下载-krita安卓版5.1.5 官方版

支持 ( 13 ) 盖楼(回复)

联通光纤 网友 zavbib 文件管理大师app下载-文件管理大师SDReader1.1 免费版
文件管理大师app下载-文件管理大师SDReader1.1 免费版

支持 ( 79 ) 盖楼(回复)

联通光纤 网友 zavbib 清新粉色桃花幻灯片背景ppt模板下载-清新粉色桃花幻灯片背景ppt免费版
清新粉色桃花幻灯片背景ppt模板下载-清新粉色桃花幻灯片背景ppt免费版

支持 ( 86 ) 盖楼(回复)

联通光纤 网友 zavbib 美丽修行查化妆品下载-美丽修行app9.2.0 安卓版
美丽修行查化妆品下载-美丽修行app9.2.0 安卓版

支持 ( 125 ) 盖楼(回复)

联通光纤 网友 zavbib 卡卡个税计算app下载-个税计算器1.9.4ios版
卡卡个税计算app下载-个税计算器1.9.4ios版

支持 ( 39 ) 盖楼(回复)

联通光纤 网友 zavbib 睿思云测软件下载-睿思云测软件(睿思页面分析专家)4.0.3037.0 绿色版
睿思云测软件下载-睿思云测软件(睿思页面分析专家)4.0.3037.0 绿色版

支持 ( 19 ) 盖楼(回复)

联通光纤 网友 zavbib 股票保本价计算工具-股票保本价计算器1.83 绿色版
股票保本价计算工具-股票保本价计算器1.83 绿色版

支持 ( 185 ) 盖楼(回复)

联通光纤 网友 zavbib 手机冒险游戏(小水母冒险记)1.2.0 官网最新版
手机冒险游戏(小水母冒险记)1.2.0 官网最新版

支持 ( 44 ) 盖楼(回复)

联通光纤 网友 zavbib 看门狗车辆头灯动态阴影mod绿色版
看门狗车辆头灯动态阴影mod绿色版

支持 ( 84 ) 盖楼(回复)

联通光纤 网友 zavbib Crime Wars Island(犯罪战争岛手游安卓版)1.51 最新版
Crime Wars Island(犯罪战争岛手游安卓版)1.51 最新版

支持 ( 101 ) 盖楼(回复)

联通光纤 网友 zavbib 魔兽地图禁魔之战1.3破解版下载-禁魔之战1.3圣光法师破解版【专属+隐藏英雄密码+作弊脚本】
魔兽地图禁魔之战1.3破解版下载-禁魔之战1.3圣光法师破解版【专属+隐藏英雄密码+作弊脚本】

支持 ( 69 ) 盖楼(回复)

联通光纤 网友 zavbib 简单菜谱app1.0 安卓版
简单菜谱app1.0 安卓版

支持 ( 127 ) 盖楼(回复)

联通光纤 网友 zavbib 德生pl380说明书-德生PL-380数调收音机用户使用指南pdf格式清晰扫描版
德生pl380说明书-德生PL-380数调收音机用户使用指南pdf格式清晰扫描版

支持 ( 198 ) 盖楼(回复)

联通光纤 网友 zavbib 玩什么(手游攻略)1.3.1 官网最新版
玩什么(手游攻略)1.3.1 官网最新版

支持 ( 25 ) 盖楼(回复)

查看更多评论

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

健康医疗 1,057.3

下载