kindeditor本身支持上传flash功能,但是我们经常需要上传一些flv、mp4或则其它格式的视频。
其实具体的播放功能是通过jwplayer实现的。我只对kindeditor简单的修改了一下。需要修改的文件有两处。
打开kindeditor\kindeditor.js文件
将以下函数语句修改
//修改过的功能 by zhjx922
function _mediaEmbed(attrs) {
var html = '<embed id="player" name="player" allowscriptaccess="always" allowfullscreen="true" ';
_each(attrs, function(key, val) {
html += key + '="' + val + '" ';
});
html += '/>';
return html;
}
打开kindeditor\plugins\flash\flash.js文件
将一下内容:
var html = K.mediaImg(self.themesPath + 'common/blank.gif', {
src : url,
type : K.mediaType('.swf'),
width : width,
height : height,
quality : 'high'