refactor(hls): [PKG-HLS-04] migrate modules and compatible types

This commit is contained in:
Harvey Zhao committed 2026-09-12 00:49:50 +08:00
1 parent ba93b98be5
commit 2f9bee4ee0
34 files changed
+4860 -88

No files matched your search

+9
View File
@@ -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 } })