为kindeditor添加在线播放视频功能(基于原有flash上传,mp4,flv,flash)
生活随笔
收集整理的這篇文章主要介紹了
为kindeditor添加在线播放视频功能(基于原有flash上传,mp4,flv,flash)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
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'總結
以上是生活随笔為你收集整理的为kindeditor添加在线播放视频功能(基于原有flash上传,mp4,flv,flash)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 我在华为工作十年
- 下一篇: spatialite android,一