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 365986e..3e366af 100644 --- a/src/utils/video.ts +++ b/src/utils/video.ts @@ -46,6 +46,12 @@ export const initHls = (monitorVideoUrl, monitorVideoRef, isDialogVisible?: () = switch (data.type) { case Hls.ErrorTypes.NETWORK_ERROR: hls.startLoad(); + hls.once(Hls.Events.FRAG_LOADED, () => { + //分片加载成功后播放 + try { + video.play().catch(() => {}); + } catch (e) {} + }); ElMessage.error('网络错误, 请检查网络或重试'); break; case Hls.ErrorTypes.MEDIA_ERROR: