您当前位置: 首页 办公效率 WordPress 视频插件-WordPress 视频插件(Smartideo)绿色免费版【附代码】

类型: 办公效率 版本: V4.9
大小: 522.1 时间: 2025-11-10





Smartideo插件使用方法世界2魔物狩猎ios存档-世界2魔物狩猎1.3 ios修改版
你可以直接粘贴视频播放也完整的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)安装方法
你可以在后台插件管理页面中直接搜索Smartideo并安装.

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

在wordpress上播放在线视频要怎么设置呢?有了这款Smartideo视频插件就简单多了,它可以帮助你快速在wordpress添加在线视频,支持手机、平板的HTML5播放,它支持优酷、搜狐视频、土豆、56、腾讯视频、新浪视频、酷6、华数、乐视等热门网站的视频。
[WordPress插件怎样安装WordPress插件安装方法]
音频转换工具-音频转换器(Konvertor FM)5.05官方免费版
1,056.7M
KonvertorFM是一种转换图像,音频,视频和文本文件以各种格式,进行图像编辑任务,以及分割视频和从剪辑提取帧和音频文件。Konvertor是一个应用软件专...
德客收银平板版下载-德客收银会员管理软件1.1.5官方平板版
1,736.2M
德客收银app是德客会员管理系统软件针对手机打造的收银管理软件,集合了多种实用的功能,各个行业都可以使用,特别适合中小实体店铺使用。德客收银会员管理软件官网介绍...
随手记账app手机版下载-随手记账app1.3.1 安卓免费版
1,490.7M
随手记账app是一款比较好用的记账软件,实用的财务分析软件,帮助大家合理的理财记录财富生活,有需要的可以来下载!随手记账app软件介绍随手记账是一款简单、实用的...
YourBand下载-YourBand软件1.0.1 安卓版
1,948.3M
YourBand是一款专为爱音乐的人士开发设计的音乐软件,平台支持官方体系化教学课程、支持歌曲分轨伴奏、支持电吉他、架子鼓等多种乐器学习辅助,帮助爱音乐的朋友们...
太古妖皇诀安卓版下载-太古妖皇诀手游2.0.12最新版
431.8M
《太古妖皇诀》是一款角色扮演手游,带有纯正的国风,让你沉浸在游戏中,感受妖灵带给你的魅力。望古韵河山,绘国风画卷,清新国风美术风格,半点墨迹亦可作无边山海,从堂...
高三励志梦想主题班会ppt-我的大学我做主高三励志主题班会ppt课件免费下载【共55页】
975.2M
高三的同学们,面临的是高考的压力,是否能够考试好大学,就看着一年了。今天东坡小编为大家带来一份我的大学我做主高三励志主题班会ppt课件,希望大家都能够顺利考试心...
数字少年宫app-数字少年宫app1.2.5安卓官网版
898.0M
衢州市青少年宫2017春季报名app其实就是一款能够让你直接在手机上面报名参加各种培训班、知识竞赛,知道班级活动、最新老师点评等信息,内容丰富,资源最新,最全。...
英雄国度Online安卓版34.3.3 最新版
64.4M
是一款最新的角色回合制游戏,游戏采用像素画风打造,玩家在游戏中拥有一座自己的城市,你将在这里建设自己的新国度,记录你的辉煌!游戏介绍《英雄国度》是2018最值得...
抽签神器软件1.0 最新苹果版
1,422.9M
抽签神器软件,是一款实用的轻型移动抽签小工具,生活中难免遇到很多事情不好抉择,需要抽签来抉择,可以帮你快捷地、公平地解决这些选择的问题、麻烦,从而轻松的让你摆脱...
魔域迷宫变态版下载-魔域迷宫变态版1.0.0 bt版
589.8M
西方魔幻画风的游戏,魔域迷宫,3D建模的人物与极其华丽的技能特效,每个章节不仅对应着卡尔凡隆大陆的一段历史,更附带着一个主动或被动技能。魔域迷宫变态版亮点1、完...
维京:人中之狼pc游戏下载-维京人中之狼3dm中文免硬盘版
157.4M
维京:人中之狼是一款大型的角色扮演类游戏,游戏英文名称是Vikings-WolvesofMidgard,支持单机模式和联机合作模式,玩家在战斗中获取敌人的鲜血献...
该喝酒的年纪千万别跟我说只喝奶茶表情包-该喝酒的年纪千万别跟我说只喝奶茶图片
1,484.0M
该喝酒的年纪千万不要说你只喝奶茶表情包什么梗?最近秋天的第一杯奶茶表情包非常火,引申出秋天的第一套房子、秋天的第一瓶啤酒等等,秋天你喜欢喝什么酒呢?感兴趣的用户...
美团优选物流端app下载安卓-美团优选物流app5.4.3 安卓版
1,942.1M
美团优选物流配送司机端,这个主要就是给美团优选的配送司机以及分拣人员员工设计的数据记录以及工作设备管理app,用户使用这个APP可以查看到最新的货物明星以及状态...
数据恢复工具(Apeaksoft Data Recovery)1.1.12 最新版
511.1M
ApeaksoftDataRecovery是一款专业实用的误删文件恢复工具。软件提供专业解决方案来处理各种数据丢失问题。它可以帮助您从计算机、回收站、硬盘/闪存...
三零鼎品下载-海南三零鼎品app1.2.3 安卓最新版
635.9M
海南三零鼎品app提供各种商品的批发购物,包含各种冷冻品,生鲜,奶制品等等,全部都是全国包邮配送的,价格十分优惠,适合超市管理人员使用!软件介绍一款由北京嬉皮兔...
超强U盘启动工具-U盘魔术师(USM)3.0.0.5 全能版
2025/11/10 21:14
2017大战国ios官网下载-大战国2021真国战策略手游1.0 官方苹果版
2025/10/24 18:04
写锤子检讨书app下载安装-写锤子检讨书软件3.5.5 最新版
2025/11/10 08:20
恐龙模拟2020安卓最新版下载-恐龙模拟2020手游1.7无敌版
2025/11/01 22:25
容易付手机客户端1.2.2 官网最新版
2025/11/02 02:31
美剧英语每日一句-美剧英语每日一句(美剧英语随口说)1.2.1 修复版
2025/10/21 21:16
百合网婚礼app-百合网婚礼3.4.0 安卓免费版
2025/10/20 06:35
道简数学启蒙下载-数学启蒙app1.3 安卓版
2025/10/23 07:27
逻辑思维导图软件下载-逻辑思维导图app3.5.0 官方版
2025/10/27 10:19
坦克天下游戏下载-坦克天下游戏2.0.34 官方版
2025/11/06 09:46
传说之下BnP5.0.0下载中文版-传说之下BnP汉化修复版(地域传说-星火复燃)5.0.0 重制版
2025/10/19 20:29
风翼app最新版本下载-风翼磁力下载器1.7.1 手机版
2025/10/22 23:40
CorelDRAW Graphics Suite 2017中文破解版最新版【64/32】
2025/10/25 02:52
万众出行app下载-万众出行1.0安卓最新版【公交查询】
2025/10/23 02:48
语音互动软件-红草莓语音互动(StrawVoiceRec)2.1.0 绿色免费版
2025/11/04 01:37
语音互动软件-红草莓语音互动(StrawVoiceRec)2.1.0 绿色免费版
2025/11/04 01:37更新
手机上的语音互动软件有很多,电脑上面的这类软件到是很少见,红草莓语音互动(StrawVoiceRec)是了个绿色免费和语音互动软件,可以虚拟对话,只需要一个麦克...
支持 ( 139 ) 盖楼(回复)
支持 ( 35 ) 盖楼(回复)
支持 ( 175 ) 盖楼(回复)
支持 ( 35 ) 盖楼(回复)
支持 ( 200 ) 盖楼(回复)
支持 ( 124 ) 盖楼(回复)
支持 ( 143 ) 盖楼(回复)
支持 ( 181 ) 盖楼(回复)
支持 ( 115 ) 盖楼(回复)
支持 ( 89 ) 盖楼(回复)
支持 ( 167 ) 盖楼(回复)
支持 ( 36 ) 盖楼(回复)
支持 ( 190 ) 盖楼(回复)
支持 ( 156 ) 盖楼(回复)
支持 ( 70 ) 盖楼(回复)
支持 ( 38 ) 盖楼(回复)
支持 ( 91 ) 盖楼(回复)
支持 ( 180 ) 盖楼(回复)
支持 ( 187 ) 盖楼(回复)
支持 ( 112 ) 盖楼(回复)