@seafile/sdoc-editor 1.0.206-test0.3.6 → 1.0.206-test0.3.8
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.
|
@@ -56,7 +56,6 @@ const generateVideoNode = (src, videoFiles) => {
|
|
|
56
56
|
exports.generateVideoNode = generateVideoNode;
|
|
57
57
|
const parseVideoLink = url => {
|
|
58
58
|
if (!url) return false;
|
|
59
|
-
console.log(url);
|
|
60
59
|
|
|
61
60
|
// Youtube url conversion
|
|
62
61
|
if (url.includes('youtube.com')) {
|
|
@@ -76,7 +75,6 @@ const parseVideoLink = url => {
|
|
|
76
75
|
if (url.includes('bilibili.com')) {
|
|
77
76
|
const vidMatch = url.match(/\/video\/(BV[0-9A-Za-z]+)/);
|
|
78
77
|
const videoUrl = vidMatch !== null && vidMatch !== void 0 && vidMatch[1] ? `https://player.bilibili.com/player.html?bvid=${vidMatch[1]}` : false;
|
|
79
|
-
console.log(videoUrl);
|
|
80
78
|
return videoUrl;
|
|
81
79
|
}
|
|
82
80
|
|
|
@@ -84,7 +82,6 @@ const parseVideoLink = url => {
|
|
|
84
82
|
if (url.includes('v.youku.com')) {
|
|
85
83
|
const vidMatch = url.match(/id_([A-Za-z0-9=]+)\.html/);
|
|
86
84
|
const videoUrl = vidMatch !== null && vidMatch !== void 0 && vidMatch[1] ? `https://player.youku.com/embed/${vidMatch[1]}` : false;
|
|
87
|
-
console.log(videoUrl);
|
|
88
85
|
return videoUrl;
|
|
89
86
|
}
|
|
90
87
|
|
|
@@ -99,6 +96,7 @@ const insertVideo = function (editor, videoFiles, srcList, selection) {
|
|
|
99
96
|
if (position !== _constants.INSERT_POSITION.AFTER) {
|
|
100
97
|
if (isInsertVideoMenuDisabled(editor)) return;
|
|
101
98
|
}
|
|
99
|
+
console.log(videoFiles[0]);
|
|
102
100
|
let videoNodes;
|
|
103
101
|
// Parse youtube, tencent or bilibili video url when embed thirdPlatform link
|
|
104
102
|
if (Array.isArray(videoFiles) && (_videoFiles$ = videoFiles[0]) !== null && _videoFiles$ !== void 0 && _videoFiles$.isEmbeddableLink) {
|