Commit fdd956722ea8a148c04abe3485f6d83c400d98f1

Authored by ww
1 parent 045d7146

fix: 修复flv.js开启自动清除缓存报错

@@ -15857,16 +15857,11 @@ class HandleDynamicEffect { @@ -15857,16 +15857,11 @@ class HandleDynamicEffect {
15857 cors: true, 15857 cors: true,
15858 hasAudio: false, 15858 hasAudio: false,
15859 withCredentials: false, 15859 withCredentials: false,
15860 - autoCleanupSourceBuffer: true,  
15861 - autoCleanupMaxBackwardDuration: 60,  
15862 }, 15860 },
15863 config: { 15861 config: {
15864 headers: { 15862 headers: {
15865 ...(isFlvUrl ? {} : { 'X-Authorization': `Bearer ${GLOBAL_TOKEN.token}` }) 15863 ...(isFlvUrl ? {} : { 'X-Authorization': `Bearer ${GLOBAL_TOKEN.token}` })
15866 - },  
15867 - hasAudio: false,  
15868 - autoCleanupSourceBuffer: true,  
15869 - autoCleanupMaxBackwardDuration: 60, 15864 + }
15870 } 15865 }
15871 }, 15866 },
15872 } 15867 }
@@ -15880,9 +15875,9 @@ class HandleDynamicEffect { @@ -15880,9 +15875,9 @@ class HandleDynamicEffect {
15880 15875
15881 setTimeout(() => { 15876 setTimeout(() => {
15882 if (!document.getElementById(idEl)) return 15877 if (!document.getElementById(idEl)) return
15883 - console.log(videoPlayConfig)  
15884 videojs(idEl, videoPlayConfig, function () { 15878 videojs(idEl, videoPlayConfig, function () {
15885 - this.play() 15879 + const playPromise = this.play()
  15880 + playPromise.catch(() => this.play())
15886 }) 15881 })
15887 }, 500); 15882 }, 500);
15888 } 15883 }