From 8bd41d6758f54aa49c9e99afff5a8133ff01cf1e Mon Sep 17 00:00:00 2001 From: Ironsp <1522278303@qq.com> Date: Fri, 26 Jun 2026 14:04:41 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E5=85=B3=E9=97=ADsrc,=20=E5=88=87?= =?UTF-8?q?=E6=96=AD=E8=A7=86=E9=A2=91=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/video.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); + } } };