Ueditor加入視頻失敗處理辦法

方法1、嘗試在編輯過程中加入視頻

 

嘗試了 幾種連接    最後發現   只有swf格式的視頻可以被識別

果斷放棄這種方法

方法2、嘗試用<iframe>

輸入的地址(以優酷爲例)

複製下來是:<iframe frameborder="0" src="https://v.qq.com/txp/iframe/player.html?vid=c0870mnzyms" allowFullScreen="true"></iframe>

複製裏面的:src中的連接   https://v.qq.com/txp/iframe/player.html?vid=c0870mnzyms 複製到鏈接框中

設置完成 

點擊確定

發現沒有任何東西

查找問題,最後在 ueditor.config.js  的428行   video下面 添加三個選項

具體代碼如下:

source: ['src', 'type'],
embed: ['type', 'class', 'pluginspage', 'src', 'width', 'height', 'align', 'style', 'wmode', 'play',
				+  'autoplay','loop', 'menu', 'allowscriptaccess', 'allowfullscreen', 'controls', 'preload'],
iframe: ['src', 'class', 'height', 'width', 'max-width', 'max-height', 'align', 'frameborder', 'allowfullscreen']

保存刷新

再添加<iframe>   填入鏈接,設置好尺寸  點完成

大功告成。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章