From 2ea2b4c3312fa3a7087ceea66556f6dd17d46afe Mon Sep 17 00:00:00 2001 From: xiaosi <2652281683@qq.com> Date: Thu, 3 Sep 2026 17:24:37 +0800 Subject: [PATCH] fix: stop native play() failures from forcing play-url refresh Normalize LivePlayer video.play() rejections to HlsError so Monitor marks fatal instead of fromRetry-refreshing /play-url in a burst. --- src/components/LivePlayer.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/LivePlayer.vue b/src/components/LivePlayer.vue index b8f3cf2..2e81a9b 100644 --- a/src/components/LivePlayer.vue +++ b/src/components/LivePlayer.vue @@ -302,7 +302,14 @@ async function attachPlayer(url, { seq: existingSeq } = {}) { return } console.warn('[live-player] play failed', error) - if (seq === attachSeq) emitFatal(error) + if (seq === attachSeq) { + // 规范化为 HlsError,避免父层把原生 DOMException 当可重试错误去刷 /play-url + emitFatal(buildPlayError({ + message: error?.message || 'play failed', + name: 'HlsError', + code: Number(error?.code) || 0, + })) + } } }