mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 17:01:20 -08:00
refactor(mediabunny): [PKG-MB-07] own HLS selection intent and menu lifecycle
This commit is contained in:
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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user