@seafile/sdoc-editor 1.0.206-test0.4.3 → 1.0.206-test0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -54,7 +54,7 @@ const AddVideoLinkDialog = _ref => {
|
|
|
54
54
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
55
55
|
}, [editor, url]);
|
|
56
56
|
const handleUrlChange = (0, _react.useCallback)(event => {
|
|
57
|
-
const videoUrl = event.target.
|
|
57
|
+
const videoUrl = event.target.value;
|
|
58
58
|
if (videoUrl === url) return;
|
|
59
59
|
console.log(videoUrl);
|
|
60
60
|
setURL(videoUrl);
|
|
@@ -100,12 +100,14 @@ const insertVideo = function (editor, videoFiles, srcList, selection) {
|
|
|
100
100
|
size: videoFiles[0].size || null,
|
|
101
101
|
isEmbeddableLink: videoFiles[0].isEmbeddableLink || false
|
|
102
102
|
};
|
|
103
|
+
console.log(videoInfo);
|
|
103
104
|
let videoNodes;
|
|
104
105
|
// Return when embedding an invalid youtube, tencent or bilibili video url
|
|
105
106
|
if (videoInfo.isEmbeddableLink) {
|
|
106
107
|
const parsedSrc = parseVideoLink(srcList[0]);
|
|
107
108
|
if (!parsedSrc) return;
|
|
108
109
|
videoNodes = generateVideoNode(parsedSrc, videoInfo);
|
|
110
|
+
console.log(videoNodes);
|
|
109
111
|
} else {
|
|
110
112
|
videoNodes = generateVideoNode(srcList[0], videoInfo);
|
|
111
113
|
}
|