mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-31 04:31:20 -08:00
refactor(mediabunny): [PKG-MB-08] checkpoint typed entry and compatible media declarations
This commit is contained in:
1 parent
8a2b56e829
commit
5e28dfee95
39 files changed
+3007
-287
No files matched your search
@@ -0,0 +1,11 @@
|
||||
import Artplayer from 'artplayer'
|
||||
import factory from 'artplayer-proxy-mediabunny'
|
||||
|
||||
type Option = Parameters<typeof factory>[0]
|
||||
const art = new Artplayer({ container: '#player', url: 'movie.mp4', proxy: factory() })
|
||||
const replacement: typeof factory = (_option?: Option) => (_art: Artplayer) => document.createElement('canvas')
|
||||
const canvas: ReturnType<ReturnType<typeof factory>> = document.createElement('canvas')
|
||||
factory()
|
||||
factory(undefined)
|
||||
factory({ volume: 0.7, source: new Blob([]), loadTimeout: 1000 })(art)
|
||||
void [replacement, canvas]
|
||||
Reference in new issue
Block a user