mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-25 16:11:20 -08:00
refactor(mediabunny): [PKG-MB-06] own audio clocks, buffers and context lifecycle
This commit is contained in:
1 parent
9d037dcbf9
commit
ccee9157a7
30 files changed
+16182
-736
No files matched your search
@@ -94,7 +94,7 @@ test('MediaBunny coordinator restores paused state after a play rejection and al
|
||||
env.art.emit('destroy')
|
||||
})
|
||||
|
||||
test('MediaBunny coordinator shares delayed audio resume across play-pause-play and starts video once', async () => {
|
||||
test('MediaBunny coordinator delegates each new play intent to the audio owner and starts video once', async () => {
|
||||
const env = environment()
|
||||
const audio = deferred()
|
||||
let attempts = 0
|
||||
@@ -107,7 +107,7 @@ test('MediaBunny coordinator shares delayed audio resume across play-pause-play
|
||||
const second = env.engine.play()
|
||||
audio.resolve()
|
||||
await Promise.all([first, second])
|
||||
assert.equal(attempts, 1)
|
||||
assert.equal(attempts, 2)
|
||||
assert.equal(env.engine.paused, false)
|
||||
assert.equal(env.calls.filter(name => name === 'video:start').length, 1)
|
||||
assert.equal(env.calls.filter(name => name === 'play').length, 1)
|
||||
|
||||
Reference in new issue
Block a user