refactor(mediabunny): [PKG-MB-07] own HLS selection intent and menu lifecycle

This commit is contained in:
Harvey Zhao committed 2026-09-12 20:51:31 +08:00
1 parent ccee9157a7
commit 8a2b56e829
27 files changed
+4217 -680

No files matched your search

@@ -199,14 +199,15 @@ export default class MediaBunnyEngine implements EnginePort {
async getHlsState() {
const media = this.media
const source = this.loadSeq
if (this.destroyed)
return null
try {
const state = await getHlsState(media)
return !this.destroyed && this.media === media ? state : null
return !this.destroyed && this.loadSeq === source && this.media === media ? state : null
}
catch (error) {
if (this.destroyed || this.media !== media)
if (this.destroyed || this.loadSeq !== source || this.media !== media)
return null
throw error
}