diff --git a/src/utils/video.ts b/src/utils/video.ts index b5947b6..35d3015 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; @@ -92,7 +93,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); + } } };