mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 06:31:20 -08:00
refactor(hls): [PKG-HLS-04] migrate modules and compatible types
This commit is contained in:
1 parent
ba93b98be5
commit
2f9bee4ee0
34 files changed
+4860
-88
No files matched your search
@@ -0,0 +1,9 @@
|
||||
import type PublicFactory from 'artplayer-plugin-hls-control'
|
||||
import factory from '../../packages/artplayer-plugin-hls-control/src/index'
|
||||
|
||||
const compatible: typeof PublicFactory = factory
|
||||
const implementation: typeof factory = compatible
|
||||
implementation({ quality: { getName: level => `${level.height}P` }, audio: { getName: track => track.name } })
|
||||
compatible()
|
||||
// @ts-expect-error Source and public declaration both reject non-string formatter results.
|
||||
factory({ quality: { getName: () => 1 } })
|
||||
Reference in new issue
Block a user