diff --git a/src/utils/video.ts b/src/utils/video.ts index f5e6b28..3a79453 100644 --- a/src/utils/video.ts +++ b/src/utils/video.ts @@ -75,7 +75,7 @@ export const initHls = (monitorVideoUrl, monitorVideoRef, isDialogVisible?: () = if (Hls.isSupported()) { const hls = new Hls({ // ★ ZLM 注册流需要时间,配置自动重试 - manifestLoadingMaxRetry: 10, + manifestLoadingMaxRetry: 20, manifestLoadingRetryDelay: 500, manifestLoadingTimeOut: 5000, levelLoadingMaxRetry: 5, @@ -123,11 +123,11 @@ export const initHls = (monitorVideoUrl, monitorVideoRef, isDialogVisible?: () = case Hls.ErrorTypes.NETWORK_ERROR: if (data.details === 'manifestLoadError' || data.details === 'manifestLoadTimeOut') { //console.error('网络错误'); - ElMessage.error('网络错误,请检查网络连接'); + ElMessage.error('网络错误,请检查网络连接, 并点击刷新'); // if (onStall) { // onStall(); // } - hls.startLoad(); + onStall(); } else { ElMessage.error('[HLS] 网络错误,自动恢复...'); hls.startLoad();