[WordPress插件怎样安装WordPress插件安装方法]
WordPress视频播放插件(Smartideo)安装方法
你可以在后台插件管理页面中直接搜索Smartideo并安装.

或者上传文件夹smartideo至/wp-content/plugins/目录.
在插件管理页面中激活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
<?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添加在线视频,支持手机、平板的HTML5播放,它支持优酷、搜狐视频、土豆、56、腾讯视频、新浪视频、酷6、华数、乐视等热门网站的视频。智慧A工程端下载-智慧A 工程端1.4 安卓版
展开内容
7.5/90.5M
火柴人联盟战争游戏是一款独特的策略对战放置游戏,组建自己的火柴人军队,排兵布阵抵御敌人的攻击,击败所有的敌人,通过冒险来获得新兵种,并不断地升级提升军队作战能力...
7.6/1,689.8M
LOL琴女终极皮肤DJ娑娜动态桌面是网友分享的一款lol动态桌面,超级漂亮的琴女动态梦幻桌面,喜欢的朋友可以来下载使用!LOL琴女终极皮肤DJ娑娜动态桌面安装方...
8.5/1,221.9M
安卓翻译官免费版全新打造的手机翻译工具,能够支持多种语言的翻译服务,应用功能强大且齐全,让你从此远离语言障碍的烦恼,不管是日常交流还是学习工作都有很好的辅助作用...
9.8/1,775.1M
玲珑奇缘满V版是款东方玄幻仙侠手游,丰富多样的玩法模式,全地图的boss任你挑战,游戏内独特的东方神话世界唯美的景色,丰富感人的故事情节,给玩家营造最棒的体验。...
9.5/127.5M
途圈app是非常强大的内容社交手机软件,在你的旅途中,你可以随时展示您生活的风采,和帅气的脸颊哟!喜欢吗?快来下载试试吧!社交软件(途圈)功能介绍途圈app是一...
8.2/621.5M
没有抢到疯狂星期四肯德基的优惠券?那么到疯狂星期四文案生成器上找找灵感吧,这个软件其实和肯德基疯狂星期四的活动没有很大关系,这个就是一个文案生成器,有点类似ai...
8.2/227.1M
为大家带来的是细胞呼吸的原理及应用ppt,适用于高中生物课程的教学使用,排版风格简约清爽,文字讲解十分的详细,使学生们的学习更加轻松,欢迎前来下载。细胞呼吸的原...
8.1/31.7M
闪图相册管家是一款管理手机相册的实用小工具,可以将你的手机相册进行瘦身,清楚不需要的垃圾文件,让你可以存储更多数据!软件介绍闪图相册管家是一款可以帮您相册瘦身的...
9.3/809.0M
下面小编为你大家带来的最新的群星star的mod-群星修改领袖能力特性mod,具有修改属性的mod,绿色稳定,喜欢就下载试试吧啊!群星修改领袖能力特性mod是什...
7.6/111.4M
仙罗手游安卓版是一款非常清新唯美的文字类的仙侠冒险游戏,游戏可以挂机放置,所以不会强制大家花时间游戏,游戏中有很多的门派大家开局可以自由选择发展,精致细腻的立绘...
9.1/335.4M
美军货物列车模拟器铁路游戏是一款运输军火车模拟游戏,采用3d游戏画面,惊人的飞行军队直升机,玩家可以享受火车的乐趣和专业驾驶的军事驾驶体验,有兴趣的玩家就来下载...
7.6/214.5M
地藏降魔录一养龙寺,打造一个仙魔纵横的玄幻世界,里面的角色都很精美,炫酷的时装进行自由选择,在养龙寺进行打怪升级,给玩家带来身临其境的游戏体验感。地藏降魔录养龙...
9.2/1,905.2M
恒风行app是一款专门为在线上进行查看公交,在线购票的软件,本软件分为多个栏目,并且每一个栏目都是为民众服务,让你出行更加方便!恒风行app介绍作为义乌“智慧公...
8.6/491.7M
这是一个批量查询.cn域名的工具,主要查询过期已经删除的域名,也就是说这个域名又可以重新注册了。根据新规,.CN英文域名的最长注册年限将由目前的5年提高至10年...
8.2/718.2M
纪念碑谷2是一款休闲类游戏,游戏中你需要用各种不同的过关模式挑战,游戏玩法多样,相信会给你带来爽快的体验,感兴趣的可以试玩哦!纪念碑谷2手游介绍本次公布的《纪念...
8.0/1,154.8M
批量小管家是一款使用十分方便的多功能微博管理软件,软件支持微博批量删除、粉丝批量删除、关注批量删除、收藏批量删除等多种功能,用户下载软件可以操作你需要的任意功能...
8.2/1,565.0M
DrJava是Java的轻量级编程环境,旨在促进测试驱动的软件开发。它包括一个智能程序编辑器,一个用于评估程序文本的交互窗格,一个源代码级调试器和一个单元测试工...
8.5/1,341.4M
漂移小赛车是一款平面赛车游戏,迷你赛车模型,操作和特效却让人感到非常刺激新鲜,只有完成任务才能获得金钱,解锁关卡。马上开启你的赛车之旅吧。漂移小赛车说明漂移小赛...
7.8/437.4M
像素版本的AR捉妖游戏,像素版一起来捉妖有超过50种的怪物可以收集,多种模式,新颖的操作方式,从不同的角度去体验,可以与好友一起pk,通过地图在世界的各个角落行...
9.0/990.3M
这是一款优惠购物软件,先领券再购物,各种大额免费优惠券领取,在这里享受优惠购物体验,很多用户都在关注,支持各大电商平台,淘宝,天猫,京东,拼多多!软件介绍淘淘云...
9.3/1,781.6M
用自己的声音疗愈自己,听我通过线下声音的采集,对您的声音进行剪辑分析,帮助您解决长期焦虑和抑郁所带来的精神压力,用自己的声音去疗愈自己。听我soundcolle...
9.3/597.9M
遥控器控制助手app是一款智能手机遥控软件,拥有强大的手机控制功能,支持多种生活电器,包含空调遥控器,电视遥控器等家电遥控器,简单好用,平时生活中找不到遥控器可...
9.3/503.0M
元气骑士是一款好玩的冒险游戏,游戏中拥有超多好玩的系统,本站为您带来了元气骑士安卓完美存档,满角色,可以尽情体验游戏的魅力。元气骑士安卓完美存档特色随机生成的关...
8.1/911.8M
翼课教师app,是一款专为教师打造的专业教学辅助工具,帮助教师快速备课,海量教学资源,辅导老师轻松制作自己的备课教程,提高教师办公的效率和质量,是为教师量身打造...
8.1/1,664.0M
霹雳决gm版以三国为题材的角色扮演类手机网络游戏,英雄的崛起在纷乱的世界里尽情决战,PVP模式下尽情发挥你的力量,多重联系的考验正在进行,崛起的英雄们正在战斗,...