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插件怎样安装WordPress插件安装方法]
WordPress视频播放插件(Smartideo)安装方法
你可以在后台插件管理页面中直接搜索Smartideo并安装.

或者上传文件夹smartideo至/wp-content/plugins/目录.
在插件管理页面中激活Smartideo.

在wordpress上播放在线视频要怎么设置呢?有了这款Smartideo视频插件就简单多了,它可以帮助你快速在wordpress添加在线视频,支持手机、平板的HTML5播放,它支持优酷、搜狐视频、土豆、56、腾讯视频、新浪视频、酷6、华数、乐视等热门网站的视频。五一劳动节黑板报图片-五一劳动节黑板报素材资料doc格式免费下载
<?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>';
}
}
展开内容
驱动人生官方下载-驱动人生8.16.11.28 官方最新版 for 32/64位
拼多多苹果版下载安装-拼多多ios版本7.68.0 iphone/ipad版
小苹果活动助手官方手机版下载-小苹果活动助手cf安卓版3.6 最新版
迷人的残酷3DM汉化补丁下载-迷人的残酷3DM汉化组简体汉化补丁3.5 最新免费版
辐射避难所最合理布局2020-辐射避难所最合理布局版3.4.3最新版
剑与魔宠手游下载-剑与魔宠手游1.5 最新版
30秒跑步比赛(30secRUN)1.0 安卓版
多功能时钟日历2.86官方最新版
湖北国税网络发票系统-湖北国税网上办税系统1.0 官方最新版
wifi俠密码查看1.0.8 安卓最新版
蔚蓝跑酷下载-蔚蓝跑酷游戏1.0 安卓版
内蒙初中信息技术考试软件下载-2017内蒙初中信息技术考试系统客户端3.0.11 官网版
ps3模拟器手机版下载-ps3模拟器安卓(PS3Emu)0.59 手机版
资源搜索工具-超级搜索软件(吾爱超级搜索)1.01绿色特别版
死亡地下城1.0.08绿色免费版
保安跑酷下载-保安跑酷游戏(地铁)0.1.0 安卓版
Flyme微信多开免封号版下载-Flyme微信多开免封号版3.4 安卓版
光盘坏轨专家 V2.0.0 免费版
镭智窗口隐藏专家V2.80 官方安装版
百度账号批量改密打码软件-手动打码版百度找回密码工具1.1 绿色免费版
临沂市拓普教育云平台-临沂市拓普教育app1.3.5 手机最新版
忍者神龟3修改器-忍者神龟3四项修改器1.0 绿色版
小伙工具箱64位破解版下载-XHTools小伙结构工具箱2.0 官方终结版 【调节光标、32&64】
AI一下软件下载官方版-AI一下智能助手软件1.5.2 最新版
金山词霸屏幕取词插件-金山词霸2016屏幕取词插件1.0 官方最新版【谷歌/火狐】
8.1/1,253.1M
很多时候上传一些网上报考的相片,都会要求压缩到40K或以下,直接用photoshop压缩很麻烦。慧铭图片压缩工具是一款简单实用的图片雅压缩工具,接下来介绍一下。...
9.7/1,046.6M
wecode程序员云笔是一款功能非常强大且绿色免费的软件,能很好的管理编程中的源代码,节省很多的时间,你值得拥有!wecode程序员云笔有什么用wecode程序...
城通网盘下载器高级版-城通网盘解析器高级版1.4 免费最新版 【含源码】
10.0/1,450.4M
如果经常在城通网盘上查找资源的过程中遇到一些讨厌的广告。那么嗨想要更有有效的进行下载资源,只有选择城通网盘解析器高级版,它不但能够帮助你快速解析真实的地址,而且...
硕鼠合并独立版-硕鼠合并(FLV视频合并工具)0.4.7.8 绿色免费版
9.7/1,632.7M
硕鼠合并是一款绿色免费的flv视频合并软件,采用mp4box和flvbind命令行来进行视频合并的gui界面软件,可以将多个flv或MP4视频文件合并为一个。软...
通达信金融终端官方最新版-通达信金融终端7.19 官方最新版 【永久免费版】
9.7/313.1M
通达信软件,相信炒股的朋友们都听说过,很多券商的的客户端,也都有跟通达信合作,通达信金融终端免费版是通达信官方发布的高速行情交易系统,免费版提供高速行情服务。通...
无损付费音乐下载器-无损音乐下载器多线程一键下载1.1.2018 最新免费版
8.2/1,761.6M
无损音乐下载器多线程一键下载是一款功能强大的歌曲下载工具,界面简洁清爽,支持多个音乐平台,搜索喜欢的音乐一键下载,支持试听拖动。无损音乐下载器多线程一键下载使用...
9.4/1,467.7M
方糖英语一款在线学习英语的软件,这里有一对一的专业英语教学,还有自己选择学习方式和老师,让老师为你量身打造学习计划,因材施教才能学更好。方糖英语介绍方糖英语是一...
畅游3D街景地图软件下载-畅游3D街景地图软件1.0.1 安卓版
8.0/1,237.1M
畅游3D街景地图是一款非常有趣的街景地图软件,可以查看国内外景点景区地图,vr街景,让你体验到身临其境的景色,非常好用,欢迎来下载体验!畅游3D街景地图软件介绍...
cad标准件库下载-cad标准件图库大全【5589张CAD图纸】dwg免费下载
9.8/447.2M
cad标准件图库可以帮助用户快速的创建标准件模型,包含了cad常用到的标准件,包含192个标准件分类,5589张CAD图纸,例如半沉头铆钉-GB870-86,侧...
7.7/1,927.7M
搜酷小说软件是一款专业搜索各种小说的软件,包括武侠的,穿越的,言情的等等都有,各种免费资源在线观看,还有省电模式,可以让你超持久观看哦!搜酷小说软件介绍专业的网...
7.6/627.8M
一款比较独特的手机音乐播放器应用,AudioV可视化音乐播放器app界面简洁,你可以自由的设置个点,播放歌曲,歌词也可以显示。特色介绍1、超简洁的界面,而且使用...
校园安全用电责任书-学校安全用电责任书(精品范本)doc格式【word免费版】
8.8/1,720.7M
这是在学校需要的学校安全用电责任书(精品范本),在校园中学生的安全用电问题总是难以解决,这里的这篇安全用电责任书可以说也只能起来警示作用,对该责任书范文有兴趣的...
法在我心中手抄报下载-法在我心中演讲稿范文3篇下载word完整免费版
8.1/1,147.6M
法律学习以及宣传在很多的学校都是开始流行以及重视起来了,那么你需要一些最新的法在我心中演讲稿吗?想怎么怎么可以最好的把这个主题说清楚吗?现在就可以试试下面的这法...
烈火屠龙1.31地图破解版下载-烈火屠龙1.31无cd破解版地图【攻略】
8.6/1,987.1M
烈火屠龙是一款好玩的魔兽地图,很多玩家下载后都觉得不错,小编提供的是烈火屠龙1.31无cd破解版地图,喜欢的玩家可以免费下载。烈火屠龙1.31地图介绍地图功能以...
8.9/161.5M
hao123看图王,实至名归的看图王。是小编用过的最清爽、最好用的看图软件,没有之一。简单的浏览图片或照片,无需复杂的功能,速度快、简单易用即可。hao123看...
PowerTool(强力进程文件粉碎器)V3.9绿色免安装版
8.7/1,933.6M
PowerToolV3.9 增加: 1.可以直接穿透魔影TDSS.TDL-4的防护,检测TDL-4rootkit&n...
8.8/886.3M
外研通app汇集了人教版、外研版、北师大版等相关教材内容,帮助用户实时同步学习不同版本的英语教材内容,包含了小学一年级到四五六年级上下册电子课本英语教材,专业名...
project2019破解版下载-project2019专业版(Microsoft Project Professional 2019)简体中文版
8.1/863.5M
MicrosoftProject是国际上最为流行的的项目管理软件工具,目前最新版本为project2019,功能强大,用户可轻松地在Project内通过语音、视...
DVD转ios文件软件-DVD to ISO(创建ISO光盘工具)1.0 免费版
8.3/390.7M
很多人都将一些文件转换为ios的格式进行储存,因为ios格式文件又可以方便的刻录到光盘中进行保存,非常的方便,需要的时候直接用光盘读取就行了,这就比其它的文件更...
小嘀咕图片加水印软件-小嘀咕图片批量加水印工具1.0 绿色免费版
7.5/1,400.5M
小嘀咕图片批量加水印工具是一款功能非常强大的水印处理工具,小嘀咕图片加水印软件支持多个不同的图片,并且处理图片非常的方便,如果你需要加水印工具的话就可以使用!小...
Sothink SWF Easy (FLASH按钮制作)V6.1.90205 汉化特别版
9.5/1,444.8M
硕思闪客易客是一个很好的Flash和GIF动画制作工具.它提供了一个方便的途径来制作Flash按钮,Flash广告横幅,Flash相册,贺卡,文字动画和Flas...
2020新年头像框生成器下载-2020新年头像框生成APP1.0手机版
8.2/1,893.2M
2020新年头像框生成器是款最近很火爆的头像制作工具,他能够够根据用户的喜好制作与众不同的头像,还有2020的字样,寓意新的一年到来哟。2020新年头像框生成器...
8.3/830.4M
想要养成一个良好的生后习惯么?戒客app为用户们提供各种科学合理的习惯养成计划,通过戒客app能够帮助大家合理的安排各种各样的项目,有需要的可以下载。戒客app...
bitcasa version-Bitcasa(云存储)1.1.6.18 官方正式版
8.7/1,292.3M
Bitcasa云存储是一款免费的云存储应用。你可以把你的照片或者文件上传其中,通过设置可以自动上传你拍摄的图片和视频,支持文件夹管理,有需要的赶紧来下载使用吧。...
configobj 下载-ini文件分析模块(python configobj)4.7.2 最新版【附安装教程】
8.9/1,108.9M
ConfigObj是一个非常强大的ini配置文件读取与分析软件,其最大的亮点在于自带的格式校验功能,并且支持复杂的嵌套格式,在python下运行,使用简单,只需...