Commit 5dc81285b2338d41ae8e58501a4465f84130c829

Authored by ww
1 parent 4fb92869

fix: video.js cdn import

@@ -33,8 +33,9 @@ @@ -33,8 +33,9 @@
33 <script src="./plugins/axios.min.js"></script> 33 <script src="./plugins/axios.min.js"></script>
34 34
35 <!-- video.js import --> 35 <!-- video.js import -->
36 - <link href="https://vjs.zencdn.net/7.10.2/video-js.min.css" rel="stylesheet">  
37 - <script src="https://vjs.zencdn.net/7.10.2/video.min.js"></script> 36 + <link href="https://cdn.jsdelivr.net/npm/video.js@7.19.2/dist/video-js.min.css" rel="stylesheet">
  37 + <!-- <script src="https://vjs.zencdn.net/7.10.2/video.min.js"></script> -->
  38 + <script src="https://cdn.jsdelivr.net/npm/video.js@7.19.2/dist/video.min.js"></script>
38 39
39 <!-- <script src="https://unpkg.com/videojs-contrib-hls/dist/videojs-contrib-hls.js"></script> --> 40 <!-- <script src="https://unpkg.com/videojs-contrib-hls/dist/videojs-contrib-hls.js"></script> -->
40 <!-- <script src="./js/jquery/jquery-3.3.1.min.js"></script>--> 41 <!-- <script src="./js/jquery/jquery-3.3.1.min.js"></script>-->
@@ -13729,10 +13729,10 @@ class HandleDynamicEffect { @@ -13729,10 +13729,10 @@ class HandleDynamicEffect {
13729 13729
13730 const videoPlayConfig = { 13730 const videoPlayConfig = {
13731 controls: true, 13731 controls: true,
13732 - bigPlayButton: true,  
13733 - textTrackDisplay: false,  
13734 - posterImage: false,  
13735 - errorDisplay: false, 13732 + // bigPlayButton: true,
  13733 + // textTrackDisplay: false,
  13734 + // posterImage: false,
  13735 + // errorDisplay: false,
13736 } 13736 }
13737 for (const record of this.videoRecordList) { 13737 for (const record of this.videoRecordList) {
13738 const { additional = {}, nodeId } = record 13738 const { additional = {}, nodeId } = record
@@ -13750,16 +13750,12 @@ class HandleDynamicEffect { @@ -13750,16 +13750,12 @@ class HandleDynamicEffect {
13750 this.graph.refresh(cell); 13750 this.graph.refresh(cell);
13751 } finally { 13751 } finally {
13752 this.graph.getModel().endUpdate() 13752 this.graph.getModel().endUpdate()
13753 - console.log(idEl)  
13754 videojs(idEl, 13753 videojs(idEl,
13755 { 13754 {
13756 ...videoPlayConfig 13755 ...videoPlayConfig
13757 }, 13756 },
13758 function () { 13757 function () {
13759 - const el = document.getElementById(idEl)  
13760 - const videoEl = el.getElementsByTagName('video')?.[0]  
13761 - videoEl.style.width = `${width}px`  
13762 - videoEl.style.height = `${height}px` 13758 + console.log(idEl)
13763 this.play() 13759 this.play()
13764 }) 13760 })
13765 } 13761 }
@@ -13792,10 +13788,6 @@ class HandleDynamicEffect { @@ -13792,10 +13788,6 @@ class HandleDynamicEffect {
13792 } 13788 }
13793 }, 13789 },
13794 function () { 13790 function () {
13795 - const el = document.getElementById(idEl)  
13796 - const videoEl = el.getElementsByTagName('video')?.[0]  
13797 - videoEl.style.width = `${width}px`  
13798 - videoEl.style.height = `${height}px`  
13799 this.play() 13791 this.play()
13800 }) 13792 })
13801 } 13793 }
@@ -13809,7 +13801,7 @@ class HandleDynamicEffect { @@ -13809,7 +13801,7 @@ class HandleDynamicEffect {
13809 13801
13810 createVideoTemplate(idEl, width, height, videoUrl, videoType = 'video/mp4') { 13802 createVideoTemplate(idEl, width, height, videoUrl, videoType = 'video/mp4') {
13811 const poster = `/thingskit-drawio/images/youtube.png` 13803 const poster = `/thingskit-drawio/images/youtube.png`
13812 - const template = `<video id="${idEl}" controls preload="auto" muted="muted" width="${width}" height="${height}" poster="${poster}" data-setup='{}'> 13804 + const template = `<video id="${idEl}" class="video-js" controls preload="auto" muted="muted" width="${width}" height="${height}" poster="${poster}" data-setup='{}'>
13813 <source src="${videoUrl}" type="${videoType}"> 13805 <source src="${videoUrl}" type="${videoType}">
13814 <p class="vjs-no-js"> 13806 <p class="vjs-no-js">
13815 要查看此视频,请启用JavaScript,并考虑升级web浏览器. 13807 要查看此视频,请启用JavaScript,并考虑升级web浏览器.