Optimize setBar event and add lazy loading for thumbnails in artplayer-plugin-chapter

This commit is contained in:
Harvey Zack committed 2024-06-02 22:59:42 +08:00
1 parent aaa5ef310e
commit d99fa9447a
6 files changed
+47 -25

No files matched your search

+3 -1
View File
@@ -1,5 +1,7 @@
import { AspectRatio, Flip } from './player';
export type Bar = 'loaded' | 'played' | 'hover';
export type Events = {
'video:canplay': [event: Event];
'video:canplaythrough': [event: Event];
@@ -64,5 +66,5 @@ export type Events = {
subtitleOffset: [offset: number];
restart: [url: string];
muted: [state: boolean];
setBar: [type: 'loaded' | 'played' | 'hover', event: Event];
setBar: [type: Bar, percentage: number, event?: Event];
};