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

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

<?php手拿qq资料卡图片生成工具-手拿资料卡一键生成软件1.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、华数、乐视等热门网站的视频。
进博会官方网站 澳门到威尼斯人 鸿博娱乐网址 杏彩娱乐安卓 竞彩网法甲直播展开内容
趣味数字填色app-数字填色绘本-漫芽糖APP7.0.0 安卓免费版
召唤英雄0.1折变态版下载-召唤英雄0.1折刷充无限抽1.02.115341 送SSS自选英雄
少年三国志360跳过版-少年三国志360版7.5.0热血版
巍巍南开官网下载-巍巍南开app1.0 苹果版
阿聊app下载-阿聊聊天软件3.8.7 官方免费版
全民看电影下载-全民看电影1.1 绿色版【免费观看电影】
打卡相机下载-打卡相机app0.1.0 安卓最新版
免费头像库app-免费头像贴图库(WhatSticker)1.3.2 安卓免费版【高清】
百度音乐梦幻版2016-百度音乐梦幻版9.2.12 官方最新版
途欢健康app下载-途欢健康app1.5.5 官方手机版
57券手机app下载-57券(淘宝天猫内部优惠券领取)1.1.4安卓最新版
穿越战线游戏下载-穿越战线游戏1.0.615最新版
行鸽旅游安卓版下载-行鸽旅游app2.2.1手机最新版
一起追短剧下载-一起追短剧app4.0.1.2 安卓版
超次元兵器少女bt版下载-超次元兵器少女变态版1.0 安卓版
大长今之宫廷生存札记手游下载-大长今之宫廷生存札记1.0最新版
9.1/1,825.7M
大长今之宫廷生存札记是一款模拟游戏,可以在游戏中享受到好玩的游戏玩法,全新的游戏体验感。在这里为了取得更高的未知,你必须要不择手段,时刻保持着警惕,不要被宫廷之...
9.8/1,957.5M
我是小掌门是一款趣味角色冒险养成游戏,玩家在游戏中作为一名刚接手门派的小掌门,需要努力经营自己的门派,壮大队伍。玩家也要不断冒险,认真修炼提升自己的等级。解锁更...
7.9/413.7M
享乐佳手机版十分好用的线上优惠购物商城,能够满足用户基本日常的各色购物需求,海量超值优惠商品尽等你来选择,用平时一份商品的价格在这里就可以买到双份,绝对的物超所...
佳能dc220使用说明书-Canon佳能DC220摄像机中文使用手册pdf格式用户指南
8.7/797.9M
本节内容小编要和大家分享的是Canon佳能DC220摄像机(DV)中文使用手册(pdf格式说明书),有需要的朋友可以进行下载查阅哦!温馨提示:本文档为PDF格式...
9.1/1,137.6M
顽皮开黑app是一个语音开黑软件,玩家可以通过软件找到喜欢玩游戏的朋友,一起开黑,一起聊天,交流游戏心得,喜欢的朋友可以来下载使用!顽皮开黑app介绍顽皮--火...
10.0/1,158.9M
超级坦克大战2014是手机上最好玩的一款坦克游戏了,也需要有不少的朋友是喜欢玩的,那么现在就赶快来下载体验下吧。现在更是有一些攻略以及修改辅助等着你哦!超级坦克...
8.3/675.7M
现在的导游原理越来越规范,也是需要参加考试的,易游通导游考试app有全新导游资格证考试真题题库,帮助导游提升自身技能,更高效的帮您拿下导游身份!功能介绍1、丰富...
代码英雄下载安装-代码英雄游戏最新版1.0.4148 官方正版
8.2/746.9M
代码英雄游戏,灵活的运用指尖程序来躲避危险,玩家将穿越道异世界,开局给你一把剑,在这个异世界中来谱写你的英雄传说,游戏中有非常丰富的人物需要玩家来完成,完成任务...
7.6/171.0M
追趣课堂是一款在线学习教育类服务平台,也是专注为孩子们所打造的课外课堂课程辅导好帮手,这里拥有丰富的教学课程内容,支持大家在线一键学习上课,操控简单,每日都会不...
9.7/1,227.8M
国外的苹果id锁解锁工具,首先锁定屏幕进入dfu刷机模式。在电脑端下iTunes,连接手机,按住home和开机键10秒,松开开机键,home别松,等电脑上出现提...
8.9/420.7M
金融考试准题库是专为金融考试打造的题库联系手机软件,准题库可以根据十几万用户的答题情况,分析出高频考点和高频易错点,是您考试的不错辅助。金融考试准题库特色:【2...
9.3/500.3M
如今,很多人在下班之后感觉无所事事,便想要租赁一个出租车,以此来赚取一些外快,也可以打发无聊的时间,在这里,小编为大家准备了一份出租车租赁合同,可以帮助大家不吃...
9.1/151.9M
密友圈app是一款非常好玩有趣的游戏内容,可以让你瞬间把自己的朋友们都拉进来一起聊天,让你们可以了解自己是多么厉害,成为当之无愧的社交天后,需要的下载吧。密友圈...
9.6/1,213.8M
掌上淘金是一款非常受欢迎的手机app,为我们提供更多的手机理财服务,开户等交易平台更安全,秒超网易贵金属,金道贵金属,软件的实用性很强哦。应用介绍新用户注册即获...
8.3/1,663.7M
山海经之上古神兽鲲鳐游戏是一款有着东方传奇魔幻世界的手游,山海经之上古神兽鲲鳐游戏有着众多神兽可以挑战,各种上古山海经神兽让你眼界大开,游戏有着完整的剧情可以体...
豬豬小說安卓版下载-猪猪小说(豬豬小說)app最新版2.8 官方版
7.9/507.7M
猪猪小说(豬豬小說)app最新版是一款非常优质的小说阅读器海量的书籍资源第一时间为大家分享,沉浸式听书,所有小说都可以免费看,每个人都喜欢的书籍资源的选择!软件...
csv转换工具-csv转access(CsvToAccess)3.0 官方最新版
9.1/1,313.3M
CSV格式的文件有时候需要上传到ACCESS文件中,所以需要用到这款CsvToAccess,它是一款功能强大的CSV格式转ACCESS文件,软件功能全面操作简单...
8.2/642.3M
魅力淮安app是淮安地区生活服务软件,提供淮安当地生活资讯服务、政府信息公开服务等多种服务,食住行游购娱全方位指南,喜欢的网友可以来下载!魅力淮安app介绍魅力...
黔西南人社通app下载-贵州黔西南社保手机app(人社通黔西南)2.2.0 安卓客户端
8.5/1,599.7M
社保是为了保障公民的福利更好的实现,很多城市都有各自的社保机构,那么怎样交社保呢?有什么规定或者注意的事项吗?今天东坡小编专为贵州黔西南的朋友带来了黔西南人社通...
Habitify下载-Habitify软件5.1.1 手机版
7.9/557.4M
日常生活和目标追踪软件,简单,灵活和激励!软件可以激励你过上更富有成效的生活,随时随地通过手机养成良好的工作习惯,改善自己每天的表现。软件说明在过去的两年中,我...
超级粉丝应援app下载-超级粉丝应援安卓版1.0.0 最新版
9.5/825.3M
超级粉丝应援安卓版是一款专门在微博上给爱豆打call的软件,这个软件可以自动帮助转发爱豆的微博,自动评论,自动艾特等等功能,非常强大,免费使用!软件介绍是一款微...
9.0/1,792.1M
曼鱼是一款使用的手机工具箱软件,这里有很多我们日常生活中经常会用到的一些小功能,在这里是可以直接使用的,不用另外去下载,后面还会不断的新增功能,非常的便捷。软件...
access2007免费版下载-access2007绿色版32位版
9.0/59.2M
access2007是office2007的一个组件,由于office在网上已经绝迹了,但是有时候又需要用一下access,所以就把它从office里面抽出来,...
战无双1.0.0冰封的王朝地图下载-战无双1.0.0冰封的王朝正式版【附攻略和隐藏英雄密码】
9.1/1,127.4M
战无双是一款非常好玩的对抗型的魔兽地图。这张地图支持2到10名玩家同时进行游戏。这次为大家带来的是战无双最新版哦!喜欢这款地图的玩家快来下载吧!战无双地图信息地...
8.0/1,604.0M
为大家带来的是城市景观设计案例分析ppt,适用于大学课堂的教课,精心编排的文字,精美的插图,相信老师在教学上可以更轻松,学生在学业上也更成功,欢迎下载。城市景观...