Browse Source

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.
main
xiaosi 2 weeks ago
parent
commit
2ea2b4c331
  1. 9
      src/components/LivePlayer.vue

9
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,
}))
}
}
}

Loading…
Cancel
Save