diff --git a/.eslintrc-auto-import.json b/.eslintrc-auto-import.json index d979925..2ca3adf 100644 --- a/.eslintrc-auto-import.json +++ b/.eslintrc-auto-import.json @@ -5,10 +5,6 @@ "ComputedRef": true, "DirectiveBinding": true, "EffectScope": true, - "ElLoading": true, - "ElMessage": true, - "ElMessageBox": true, - "ElNotification": true, "ExtractDefaultPropTypes": true, "ExtractPropTypes": true, "ExtractPublicPropTypes": true, diff --git a/src/utils/video.ts b/src/utils/video.ts index a07aafb..e6393b0 100644 --- a/src/utils/video.ts +++ b/src/utils/video.ts @@ -75,8 +75,8 @@ export const initHls = (monitorVideoUrl, monitorVideoRef, isDialogVisible?: () = if (Hls.isSupported()) { const hls = new Hls({ // ★ ZLM 注册流需要时间,配置自动重试 - manifestLoadingMaxRetry: 20, - manifestLoadingRetryDelay: 500, + manifestLoadingMaxRetry: 5, + manifestLoadingRetryDelay: 1000, manifestLoadingTimeOut: 5000, levelLoadingMaxRetry: 5, levelLoadingRetryDelay: 500, @@ -86,8 +86,32 @@ export const initHls = (monitorVideoUrl, monitorVideoRef, isDialogVisible?: () = liveSyncDurationCount: 3, liveDurationInfinity: true, // 缓冲区上限,防止无限增长导致内存爆掉 - maxBufferLength: 30, - maxMaxBufferLength: 60 + maxBufferLength: 5, + maxMaxBufferLength: 10, + // manifest 加载:最多重试 5 次,每次间隔 1 秒,单次超时 10 秒 + // manifestLoadingMaxRetry: 5, + // manifestLoadingRetryDelay: 1000, + // manifestLoadingTimeOut: 10000, + // // level(清晰度)加载:最多重试 3 次,每次间隔 1 秒,单次超时 15 秒 + // levelLoadingMaxRetry: 3, + // levelLoadingRetryDelay: 1000, + // levelLoadingTimeOut: 15000, + // lowLatencyMode: true, + // startLevel: -1, + // // 直播同步:滞后 2 个分片时自动追赶 live edge + // liveSyncDurationCount: 2, + // liveDurationInfinity: true, + // // 不保留已播放过的旧缓冲,减少内存占用 + backBufferLength: 0 + // // 缓冲区上限 5~10 秒,限制同时发出的分片请求数,防止占满连接池 + // maxBufferLength: 5, + // maxMaxBufferLength: 10, + // // 分片加载:最多重试 3 次,每次间隔 2 秒,单次超时 15 秒 + // fragLoadingMaxRetry: 3, + // fragLoadingRetryDelay: 2000, + // fragLoadingTimeOut: 15000 + // // 允许缓冲区内最大 0.5 秒的空洞,避免小卡顿触发不必要的重载 + // maxBufferHole: 0.5 }); hls.loadSource(url); diff --git a/src/views/equipmentList/list.vue b/src/views/equipmentList/list.vue index 70a9372..16f5675 100644 --- a/src/views/equipmentList/list.vue +++ b/src/views/equipmentList/list.vue @@ -232,6 +232,7 @@