kindeditor支持flv視頻播放方法
2014/12/15 12:04:461379 閱讀
打開plugins\media下面的media.js,打開,找到下面的代碼:
var html = K.mediaImg(self.themesPath + 'common/blank.gif', {
src: url,
type: K.mediaType(url),
width: width,
height: height,
autostart: autostartBox[0].checked ? 'true': 'false',
loop: 'true'
});
修改為:
if (url.slice( - 4).toUpperCase() == '.FLV') {
var html = K.mediaImg(self.themesPath + 'common/blank.gif', {
src: '/js//Flvplayer.swf',
type: K.mediaType(url),
flashvars: 'vcastr_file=' + url + '&autostart=' + (autostartBox[0].checked ? 'true': 'false') + '',
width: width,
height: height,
quality: 'high',
allowfullscreen: 'true',
loop: 'true'
});
} else {
var html = K.mediaImg(self.themesPath + 'common/blank.gif', {
src: url,
type: K.mediaType(url),
width: width,
height: height,
autostart: autostartBox[0].checked ? 'true': 'false',
loop: 'true'
});
}
參考文章地址:
http://kindeditor.net/view.php?bbsid=7&postid=7275
測試原文修改后不能正常播放,稍加修改,即:file修改為vcastr_file
下一條:vb asp截取ip前三段
上一條:VB轉(zhuǎn)換UNIX時間戳的方法