mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-21 21:01:20 -08:00
refactor(mediabunny): [PKG-MB-08] finish typed media capability boundaries
This commit is contained in:
1 parent
5e28dfee95
commit
fb9fb23f53
25 files changed
+2698
-30
No files matched your search
@@ -363,6 +363,8 @@ async function loadingEnvironment() {
|
||||
const audio = deferred()
|
||||
const metadata = {}
|
||||
env.engine.video.load = (media, callback) => {
|
||||
// This fixture represents a supported decoder whose metadata/completion are delayed.
|
||||
env.engine.video.videoSink = {}
|
||||
metadata.video = callback
|
||||
return video.promise
|
||||
}
|
||||
@@ -493,6 +495,8 @@ function replacementEnvironment() {
|
||||
const track = { isLive: async () => false }
|
||||
const input = { getDurationFromMetadata: async () => 8 }
|
||||
env.engine.media = { input, videoTrack: track, audioTrack: null, isHls: true, videoMode: 'auto', audioMode: 'auto', duration: 8 }
|
||||
// The already selected media has a working video decoder before a replacement starts.
|
||||
env.engine.video.videoSink = {}
|
||||
env.engine.video.load = async () => env.calls.push('video:load')
|
||||
env.engine.audio.load = async () => env.calls.push('audio:load')
|
||||
return env
|
||||
|
||||
Reference in new issue
Block a user