refactor(vtt-thumbnail): [PKG-VTT-THUMB-04] preserve legacy types and expose async runtime entry

This commit is contained in:
Harvey Zhao committed 2026-09-13 09:30:57 +08:00
1 parent 7f2906ae52
commit db358a3ae4
33 files changed
+3864 -98

No files matched your search

@@ -0,0 +1,9 @@
import Artplayer from 'artplayer'
import vtt from 'artplayer-plugin-vtt-thumbnail'
const option: Parameters<typeof vtt>[0] = { vtt: '/cues.vtt', style: { opacity: '0.8' } }
const art = new Artplayer({ container: '#player', url: '/video.mp4', plugins: [vtt(option)] })
const result: ReturnType<ReturnType<typeof vtt>> = { name: 'artplayerPluginVttThumbnail' }
const replacement: typeof vtt = (_option: Parameters<typeof vtt>[0]) => (_art: Artplayer) => result
void vtt(option)(art).name
void replacement