diff --git a/src/utils/video.ts b/src/utils/video.ts index de63ef7..49b8608 100644 --- a/src/utils/video.ts +++ b/src/utils/video.ts @@ -1,4 +1,5 @@ import Hls from 'hls.js'; +import { log } from 'node:console'; let hlsInstance: Hls | null = null; // let hlsRetryCount = 0; @@ -68,7 +69,9 @@ export const destroyHls = (monitorVideoRef) => { video.removeAttribute('src'); // 对某些浏览器,需要调用 load() 来重置 media element if (typeof video.load === 'function') video.load(); - } catch (e) {} + } catch (e) { + console.log('Error in destroyHls:', e); + } } };