mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 23:51:20 -08:00
Add ts to demo
This commit is contained in:
1 parent
d906a860c9
commit
0e0bdd00dd
3 files changed
+346
-11
No files matched your search
+4
-3
@@ -1,4 +1,5 @@
|
||||
export = Artplayer;
|
||||
export as namespace Artplayer;
|
||||
|
||||
interface Selector {
|
||||
default?: boolean;
|
||||
@@ -29,7 +30,7 @@ interface Component {
|
||||
add(option: ComponentOption): HTMLElement;
|
||||
}
|
||||
|
||||
type Plugin = (art: Artplayer) => any;
|
||||
type PluginFunction = (art: Artplayer) => any;
|
||||
type WhitelistFunction = (ua: string) => Boolean;
|
||||
type CustomType = (video: HTMLVideoElement, url: string, art: Artplayer) => any;
|
||||
type EventCallback = (event: Event) => any;
|
||||
@@ -66,7 +67,7 @@ interface Option {
|
||||
localVideo?: boolean;
|
||||
localSubtitle?: boolean;
|
||||
useSSR?: boolean;
|
||||
plugins?: Plugin[];
|
||||
plugins?: PluginFunction[];
|
||||
whitelist?: (string | WhitelistFunction | RegExp)[];
|
||||
layers?: ComponentOption[];
|
||||
contextmenu?: ComponentOption[];
|
||||
@@ -271,7 +272,7 @@ declare class Artplayer extends Player {
|
||||
|
||||
readonly plugins: {
|
||||
readonly id: number;
|
||||
add(plugin: Plugin): Artplayer['plugins'];
|
||||
add(plugin: PluginFunction): Artplayer['plugins'];
|
||||
};
|
||||
|
||||
readonly i18n: {
|
||||
|
||||
Reference in new issue
Block a user