mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-27 17:51:20 -08:00
refactor(vtt-thumbnail): [PKG-VTT-THUMB-04] preserve legacy types and expose async runtime entry
This commit is contained in:
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
|
||||
Reference in new issue
Block a user