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插件安装方法]
<?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并安装.

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

在wordpress上播放在线视频要怎么设置呢?有了这款Smartideo视频插件就简单多了,它可以帮助你快速在wordpress添加在线视频,支持手机、平板的HTML5播放,它支持优酷、搜狐视频、土豆、56、腾讯视频、新浪视频、酷6、华数、乐视等热门网站的视频。爱学吉他教程1.0.0官方安卓版
亚博电竞安全吗 开奖前的操作 亿彩网app 天空彩牛网 贝贝打鱼手机版展开内容
鹤壁人社掌上app下载-鹤壁人社平台1.1 安卓版
手机空调遥控器2.4 多功能无广告版
蕉太狼蕉个朋友表情包高清图下载-蕉太狼蕉个朋友表情包2020无水印完整版
玄境OL(RPG手机网游)2.3.0 最新版
美之图苹果下载安装-美之图app苹果版官方版(美姿图)1.4.7 最新版
智慧广科app下载-智慧广科app3.7.4 安卓版
南方公园完整破碎中文破解版下载-南方公园完整破碎1.0 最新汉化硬盘免安装破解版
复古传说手游下载-复古传说ios版1.0 正版
趣花生活app下载-趣花生活软件1.2.4 安卓版
万合出行下载-万合出行app1.0.0安卓版
饭局狼人杀百度版下载-饭局狼人杀百度版本2.5.76安卓百度版
掘金 ios苹果版-掘金(技术分享社区)3.4.1 官网苹果版
弹性绳索手游下载-弹性绳索游戏1.4安卓版
钢铁战车模拟下载-钢铁战车模拟游戏1.0.0 正版
攻富熊猫游戏下载红包版-攻富熊猫1.0.1 安卓版
8.9/228.6M
律英app是一款综合性法律服务软件。在这里你可以立即寻找律师。实现法律援助一键呼应。用户可以询问法律问题,如果有民事诉讼可以找律师打官司,是您贴心的法律秘书。有...
乐谱文本编辑器下载-乐谱文本编辑器( Frescobaldi)2.91.5免费版下载
9.1/694.1M
Frescobaldi是一个跨平台的应用程序,它被设计用来作为音乐表编辑器,有先进的功能,可以帮助专业人士,也同样适用于初学者。易于使用的界面提供了快速访问所有...
7.9/1,020.2M
边缘战士v1.0六项修改器by风灵月影对应游戏版本:v1.0+SKIDROW破解补丁,修改器同样适用于64位系统。基本功能点击 简体 繁体&...
BassBoosterPro安卓版apk下载-BassBoosterPro app3.0.3 安卓版
9.6/646.2M
今天小编为大家带来的是BassBoosterPro,这是一款重低音音效加强软件,支持6波段均衡器,20种预设风格,支持多个播放器。大家赶紧下载体验吧!BassB...
8.8/589.0M
大神去水印专业版超好用的水印去除辅助工具,让你轻松一键去除水印,还有众多优质滤镜加字功能可以选用,非常的轻松又便捷,让你对图片有更加优质的处理方式,如果你也对此...
7.5/1,573.4M
爱定边app是一款专为陕西定边地区用户打造的智慧生活信息服务应用,为用户提供便捷的民生服务、免费WIFI、政务信息发布等功能,最新的本地新闻资讯第一时间更新,便...
10.0/725.9M
很多软件都会有破解版,这让原作者很是头疼,今天东坡小编带来一款CLG乱序工具,它能打乱clg代码防反汇编,防反编译,是一种保护代码的方式,有需要的欢迎下载使用!...
战舰世界闪击战国际服官方下载-战舰世界闪击战国际服6.1.0 最新版
7.8/439.1M
战舰世界闪击战国际服官网免费下载,是真正的国际服高质量游戏版本。战舰世界闪击战是一款战舰题材的手游,网易代理大型多人战舰竞技手游《战舰世界闪击战》七系战舰待命出...
7.7/1,120.2M
怎么看app是一款公众号阅读工具,聚合当下热门的新闻资源,推荐优质的内容,发现你感兴趣有优质作者,有兴趣的朋友就来下载吧。怎么看app功能介绍-梳理新闻热点,不...
NFC Tasks插件下载-nfc tasks汉化版5.1.1 最新手机版
7.8/175.0M
NFCTasks是搭配NFCtool一起使用的,可以理解的NFCTasks是NFCTools的一个插件,NFCTools有些功能要用这个NFCTasks来实现。...
8.7/365.7M
这里带来的是ppt目录素材——中国竹韵风格ppt目录素材,目录以竹子为背景,适合制作中国风ppt模板,素材一共有3中款式,大家可以免费下载使用。中国竹韵风格pp...
9.1/1,295.4M
文件夹隐藏大师是一款完全免费的文件/文件夹隐藏软件,可以帮助您隐藏或伪装你的文件夹和文件,并提供密码保护功能。文件夹隐藏大师不像其他的文件/文件夹的隐藏软件,它...
鲨鱼攻击模拟器游戏下载-鲨鱼攻击模拟3d手机版2.1 安卓版
10.0/210.8M
真实的模拟鲨鱼在海滩上面攻击的画面,这个是让玩家变成鲨鱼的游戏,玩家需要控制鲨鱼,同时鲨鱼也是需要避开各种猎人的枪,这个是要玩家的操作能力!鲨鱼攻击模拟3d手机...
机关服务平台app官方正版下载-机关服务平台3.5.4 安卓版
8.9/204.3M
机关服务平台是一款专为机关工作者打造的线上实用办公软件,可以在这里了解到群众的反馈,用最快最正确的方式解决群众生活中的问题。把事情落到实处,还可以随时了解最新动...
panicbutton插件下载-一键隐藏Chrome插件(panicbutton)0.25 免费最新版 【2015】
8.6/1,068.7M
其实对于不少习惯用chrome来访问网站的朋友来说,都不想自己的隐私就这样暴露在别人赤裸裸的眼光下。那么可以借助PanicButton,这款是款非常好用的chr...
7.6/858.8M
云医笔记是一个医生朋友使用的手机软件,帮助医生朋友记录工作中的问题,还可以帮助患者解决各种问题,快速解答!软件介绍云医笔记是一款医生在线管理自己患者的工具,医生...
9.9/1,730.2M
天环冻品app是一款覆盖面广的冷链交易中心,它是全国最大的冷冻商品交易平台,是批发商绝对不能错过的批发软件,而且价格优惠赶紧来下载吧。天环冻品商城app介绍天环...
8.1/1,206.0M
vivo游戏魔盒是专为vivo手机用户量身打造的游戏辅助工具,核心目标是为玩家带来更便捷、更具个性化的游戏体验。不仅提供丰富的游戏资源供用户下载,还配备了实用的...
泡泡节日嘉年华app下载-泡泡节日嘉年华1.0.4 手机最新版
8.6/1,875.4M
小朋友们,你们知道多少中华传统节日呢?快来泡泡节日嘉年华看看吧,在这里,有故事屋、音乐厅和参与嘉年华活动地点,赶快参与进来吧!泡泡节日嘉年华介绍泡泡节日嘉年华a...
仙缘传说0.1无cd版下载-仙缘传说0.1破解版【正版隐藏英雄密码+作弊脚本+P闪+神装】
7.9/41.6M
仙缘传说0.1破解版是一款非常好玩的魔兽防守地图,给大家提供最新的破解版下载,修改了很多内容,附赠正版隐藏密码和作弊刷物品等,感兴趣的快来下载吧!仙缘传说0.1...
8.6/641.7M
二外小灵通是一个非常不错的外语学习平台,支持英、法、日和西班牙语,用户只要在这四种语音中有什么问题都可以来这里提问,想学好外语的朋友欢迎下载体验!二外小灵通ap...
霸王天下游戏下载-霸王天下手游官方版1.225.102 最新版
8.7/1,402.9M
全新三国卡牌对战手游---霸王天下,以经典三国为题材背景,招募各路英雄豪杰攻占更多的城池;这款三国手游与其他不一样的点在于它的画风融入了卡通的元素,玩起来没有任...
签到荚安卓官方下载-签到荚app(大学新生考勤签到软件)3.1.58官方最新版
7.8/1,780.5M
大学新手考勤签到怎么才可以确定每一个学生都是到了,也是让很多的辅导员以及老师是非常的在意的问题,现在就可以使用集合了刷脸、定位、二维码多种签到功能的app软件签...
钉钉自动打卡辅助软件下载-FastDing钉钉自动打卡脚本1.0.4 安卓最新版
8.2/41.8M
现在很多企业都在使用钉钉办公,使用钉钉进行考勤打卡,但是很多打工人经常会忘记上下班打卡,经常会忘记打卡的朋友可以试试FastDing钉钉自动打卡脚本,可以帮助大...
看图识字软件下载-baby flashcard看图识字7.4 安卓版
7.9/1,808.7M
在中国,一直把孩子的启蒙看的比较重要。古时是请名师指点,现在是五花八门,什么样式的启蒙教育都有。以至于现在有很多的家长自己在家给自己的宝宝一些启蒙教育,而这样的...