Fckeditor插入视频或视频文件
来源:互联网 发布:淘宝网注册网店步骤 编辑:程序博客网 时间:2024/05/01 04:46
一、分别打开:editor/js/fckeditorcode_ie_1.js和/editor/js/fckeditorcode_gecko_1.js
找到
C.src.endsWith('.swf',true)
替换为:
C.src.endsWith('.swf',true) || C.src.endsWith('.mpg',true) || C.src.endsWith('.asf',true) || C.src.endsWith('.wma',true) || C.src.endsWith('.wmv',true) || C.src.endsWith('.avi',true) || C.src.endsWith('.mov',true) || C.src.endsWith('.mp3',true) || C.src.endsWith('.rm',true) || C.src.endsWith('.ra',true) || C.src.endsWith('.rmvb',true) || C.src.endsWith('.mid',true) || C.src.endsWith('.ram',true)
文件格式你根据实际情况增加。
二、打开/editor/dialog/fck_flash/fck_flash.js
1、增加
function WinPlayer(url){
var r, re;
re = /.(avi|wmv|asf|wma|mid|mp3|mpg)$/i;
r = url.match(re);
return r;
}
function RealPlayer(url){
var r, re;
re = /.(.rm|.ra|.rmvb|ram)$/i;
r = url.match(re);
return r;
}
function QuickTime(url){
var r, re;
re = /.(mov|qt)$/i;
r = url.match(re);
return r;
}
function FlashPlayer(url){
var r, re;
re = /.swf$/i;
r = url.match(re);
return r;
}
2、替换
e.type = 'application/x-shockwave-flash' ;
为
if(WinPlayer(GetE('txtUrl').value)!=null){
e.type = 'application/x-mplayer2' ;
}
if(RealPlayer(GetE('txtUrl').value)!=null){
e.type = 'audio/x-pn-realaudio-plugin' ;
}
if(QuickTime(GetE('txtUrl').value)!=null){
e.type = 'video/quicktime' ;
}
if(FlashPlayer(GetE('txtUrl').value)!=null){
e.type = 'application/x-shockwave-flash' ;
e.pluginspage = 'http://www.macromedia.com/go/getflashplayer' ;
}
3、替换
SetAttribute( e, 'type', 'application/x-shockwave-flash' ) ;
SetAttribute( e, 'pluginspage' , 'http://www.macromedia.com/go/getflashplayer' ) ;
为
if(WinPlayer(GetE('txtUrl').value)!=null){
e.type = 'application/x-mplayer2' ;
SetAttribute( e, 'autostart', GetE('chkAutoPlay').checked ? 'true' : 'false' ) ;
}
if(RealPlayer(GetE('txtUrl').value)!=null){
e.type = 'audio/x-pn-realaudio-plugin' ;
SetAttribute( e, 'autostart', GetE('chkAutoPlay').checked ? 'true' : 'false' ) ;
}
if(QuickTime(GetE('txtUrl').value)!=null){
e.type = 'video/quicktime' ;
SetAttribute( e, 'autostart', GetE('chkAutoPlay').checked ? 'true' : 'false' ) ;
}
if(FlashPlayer(GetE('txtUrl').value)!=null){
e.type = 'application/x-shockwave-flash' ;
SetAttribute( e, 'scale', GetE('cmbScale').value ) ;
SetAttribute( e, 'menu', GetE('chkMenu').checked ? 'true' : 'false' );
SetAttribute( e, 'play', GetE('chkAutoPlay').checked ? 'true' : 'false' ) ;
}
找到
程序代码
C.src.endsWith('.swf',true)
替换为:
程序代码
C.src.endsWith('.swf',true) || C.src.endsWith('.mpg',true) || C.src.endsWith('.asf',true) || C.src.endsWith('.wma',true) || C.src.endsWith('.wmv',true) || C.src.endsWith('.avi',true) || C.src.endsWith('.mov',true) || C.src.endsWith('.mp3',true) || C.src.endsWith('.rm',true) || C.src.endsWith('.ra',true) || C.src.endsWith('.rmvb',true) || C.src.endsWith('.mid',true) || C.src.endsWith('.ram',true)
文件格式你根据实际情况增加。
二、打开/editor/dialog/fck_flash/fck_flash.js
1、增加
程序代码
function WinPlayer(url){
var r, re;
re = /.(avi|wmv|asf|wma|mid|mp3|mpg)$/i;
r = url.match(re);
return r;
}
function RealPlayer(url){
var r, re;
re = /.(.rm|.ra|.rmvb|ram)$/i;
r = url.match(re);
return r;
}
function QuickTime(url){
var r, re;
re = /.(mov|qt)$/i;
r = url.match(re);
return r;
}
function FlashPlayer(url){
var r, re;
re = /.swf$/i;
r = url.match(re);
return r;
}
2、替换
程序代码
e.type = 'application/x-shockwave-flash' ;
为
程序代码
if(WinPlayer(GetE('txtUrl').value)!=null){
e.type = 'application/x-mplayer2' ;
}
if(RealPlayer(GetE('txtUrl').value)!=null){
e.type = 'audio/x-pn-realaudio-plugin' ;
}
if(QuickTime(GetE('txtUrl').value)!=null){
e.type = 'video/quicktime' ;
}
if(FlashPlayer(GetE('txtUrl').value)!=null){
e.type = 'application/x-shockwave-flash' ;
e.pluginspage = 'http://www.macromedia.com/go/getflashplayer' ;
}
3、替换
程序代码
SetAttribute( e, 'type', 'application/x-shockwave-flash' ) ;
SetAttribute( e, 'pluginspage' , 'http://www.macromedia.com/go/getflashplayer' ) ;
为
程序代码
if(WinPlayer(GetE('txtUrl').value)!=null){
e.type = 'application/x-mplayer2' ;
SetAttribute( e, 'autostart', GetE('chkAutoPlay').checked ? 'true' : 'false' ) ;
}
if(RealPlayer(GetE('txtUrl').value)!=null){
e.type = 'audio/x-pn-realaudio-plugin' ;
SetAttribute( e, 'autostart', GetE('chkAutoPlay').checked ? 'true' : 'false' ) ;
}
if(QuickTime(GetE('txtUrl').value)!=null){
e.type = 'video/quicktime' ;
SetAttribute( e, 'autostart', GetE('chkAutoPlay').checked ? 'true' : 'false' ) ;
}
if(FlashPlayer(GetE('txtUrl').value)!=null){
e.type = 'application/x-shockwave-flash' ;
SetAttribute( e, 'scale', GetE('cmbScale').value ) ;
SetAttribute( e, 'menu', GetE('chkMenu').checked ? 'true' : 'false' );
SetAttribute( e, 'play', GetE('chkAutoPlay').checked ? 'true' : 'false' ) ;
}
- Fckeditor插入视频或视频文件
- Fckeditor插入视频或视频文件
- html插入音频或视频
- 从摄像头或视频文件中读取视频流并显示
- 从摄像头或视频文件中读取视频流并显示
- 在FCKeditor 2.6中添加插入视频和音频功能
- 实现在DeDeCMS/FCKeditor中插入flv视频
- 给FCKeditor扩展插入FLV视频功能(含播放器)--研究成功给大家分享
- 如何在csdn博客中插入视频或gif
- opencv读取摄像头或视频文件
- 插入视频
- 网页中插入各种类型视频文件
- asp.net网页里插入视频文件
- 解决会声会影X4无法插入AVI视频文件!
- asp.net网页里插入视频文件
- 解决会声会影X4无法插入AVI视频文件!
- KTV点歌系统--视频基础知识学习--视频文件
- 视频修复工具修复损坏avi视频文件
- tomcat中的几种连接池配置代码(包括tomcat5.0,tomcat5.5x,tomcat6.0)
- 超强的指针学习笔记
- SVG基础教程
- 生命的常青树在这里
- 线程终止时的清理
- Fckeditor插入视频或视频文件
- C语言-预处理程序
- NetBeans 速度慢的原因
- ATL写的一个超链接类
- HTML系列之一-介绍
- 我的读书生涯
- .net中SqlConnection中连接字符串 ConnectionString 中的关键字值的有效名称
- Photoshop图层混合模式计算公式大全
- 15种导致失败的性格