diff --git a/sample/html/options.html b/sample/html/options.html index cb1b12de8..77cf65913 100644 --- a/sample/html/options.html +++ b/sample/html/options.html @@ -645,7 +645,7 @@

Applied options

videoResizing: document.getElementById('videoResizing').checked ? undefined : false, videoHeightShow: document.getElementById('videoHeightShow').checked ? undefined : false, videoAlignShow: document.getElementById('videoAlignShow').checked ? undefined : false, - videoFileInput: document.getElementById('videoFileInput').checked ? undefined : false, + videoFileInput: document.getElementById('videoFileInput').checked ? true : false, videoUrlInput: document.getElementById('videoUrlInput').checked ? undefined : false, videoRatioShow: document.getElementById('videoRatioShow').checked ? undefined : false, videoWidth: document.getElementById('videoWidth').checked ? document.getElementById('videoWidth_value').value : undefined, diff --git a/src/plugins/dialog/video.js b/src/plugins/dialog/video.js index a32b48b90..8e9e73659 100644 --- a/src/plugins/dialog/video.js +++ b/src/plugins/dialog/video.js @@ -541,7 +541,7 @@ export default { url = 'https://player.vimeo.com/video/' + url.slice(url.lastIndexOf('/') + 1); } - this.plugins.video.create_video.call(this, this.plugins.video.createIframeTag.call(this), url, contextVideo.inputX.value, contextVideo.inputY.value, contextVideo._align, null, this.context.dialog.updateModal); + this.plugins.video.create_video.call(this, this.plugins.video[(!/youtu\.?be/.test(url) && !/vimeo\.com/.test(url) ? "createVideoTag" : "createIframeTag")].call(this), url, contextVideo.inputX.value, contextVideo.inputY.value, contextVideo._align, null, this.context.dialog.updateModal); } catch (error) { throw Error('[SUNEDITOR.video.upload.fail] cause : "' + error.message + '"'); } finally { diff --git a/src/plugins/modules/fileManager.js b/src/plugins/modules/fileManager.js index 79b252858..e5a8c03eb 100644 --- a/src/plugins/modules/fileManager.js +++ b/src/plugins/modules/fileManager.js @@ -28,8 +28,6 @@ _checkMediaComponent: function (tag) { if (/IMG/i.test(tag)) { return !/FIGURE/i.test(tag.parentElement.nodeName) || !/FIGURE/i.test(tag.parentElement.parentElement.nodeName); - } else if (/VIDEO/i.test(tag)) { - return !/FIGURE/i.test(tag.parentElement.nodeName); } return true; },