mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 00:31:20 -08:00
update d.ts
This commit is contained in:
1 parent
e2e15994c6
commit
0aa9189d17
2 files changed
+18
-26
No files matched your search
Vendored
+9
-13
@@ -174,7 +174,7 @@ type Component = {
|
||||
|
||||
type PluginFunction = (art: Artplayer) => any | ((option: any) => (art: Artplayer) => any);
|
||||
type CustomType = (video: HTMLVideoElement, url: string, art: Artplayer) => any;
|
||||
type WhitelistFunction = (ua: string) => Boolean;
|
||||
type WhitelistFunction = (ua: string) => boolean;
|
||||
type EventCallback = (event: Event) => any;
|
||||
|
||||
type SubtitleOption = {
|
||||
@@ -712,13 +712,9 @@ declare class Artplayer extends Player {
|
||||
emit(name: Events): void;
|
||||
off(name: Events, callback?: Function): void;
|
||||
|
||||
query(selector: string): HTMLElement;
|
||||
proxy(
|
||||
target: HTMLElement,
|
||||
name: string,
|
||||
callback: EventCallback,
|
||||
option?: { passive?: boolean; once?: boolean; capture?: boolean } | Boolean,
|
||||
): Function;
|
||||
query: Artplayer['template']['query'];
|
||||
proxy: Artplayer['events']['proxy'];
|
||||
|
||||
destroy(removeHtml?: boolean): void;
|
||||
|
||||
readonly template: {
|
||||
@@ -752,11 +748,11 @@ declare class Artplayer extends Player {
|
||||
};
|
||||
|
||||
readonly events: {
|
||||
proxy(
|
||||
target: HTMLElement,
|
||||
name: string,
|
||||
callback: EventCallback,
|
||||
option?: { passive?: boolean; once?: boolean; capture?: boolean } | Boolean,
|
||||
proxy<K extends keyof WindowEventMap, T extends HTMLElement = HTMLDivElement>(
|
||||
target: T,
|
||||
name: K,
|
||||
callback: (event: WindowEventMap[K]) => void,
|
||||
options?: boolean | AddEventListenerOptions,
|
||||
): Function;
|
||||
hover(target: HTMLElement, mouseenter?: EventCallback, mouseleave?: EventCallback): Function;
|
||||
loadImg(target: HTMLImageElement | string): Promise<HTMLImageElement>;
|
||||
|
||||
+9
-13
@@ -174,7 +174,7 @@ type Component = {
|
||||
|
||||
type PluginFunction = (art: Artplayer) => any | ((option: any) => (art: Artplayer) => any);
|
||||
type CustomType = (video: HTMLVideoElement, url: string, art: Artplayer) => any;
|
||||
type WhitelistFunction = (ua: string) => Boolean;
|
||||
type WhitelistFunction = (ua: string) => boolean;
|
||||
type EventCallback = (event: Event) => any;
|
||||
|
||||
type SubtitleOption = {
|
||||
@@ -712,13 +712,9 @@ declare class Artplayer extends Player {
|
||||
emit(name: Events): void;
|
||||
off(name: Events, callback?: Function): void;
|
||||
|
||||
query(selector: string): HTMLElement;
|
||||
proxy(
|
||||
target: HTMLElement,
|
||||
name: string,
|
||||
callback: EventCallback,
|
||||
option?: { passive?: boolean; once?: boolean; capture?: boolean } | Boolean,
|
||||
): Function;
|
||||
query: Artplayer['template']['query'];
|
||||
proxy: Artplayer['events']['proxy'];
|
||||
|
||||
destroy(removeHtml?: boolean): void;
|
||||
|
||||
readonly template: {
|
||||
@@ -752,11 +748,11 @@ declare class Artplayer extends Player {
|
||||
};
|
||||
|
||||
readonly events: {
|
||||
proxy(
|
||||
target: HTMLElement,
|
||||
name: string,
|
||||
callback: EventCallback,
|
||||
option?: { passive?: boolean; once?: boolean; capture?: boolean } | Boolean,
|
||||
proxy<K extends keyof WindowEventMap, T extends HTMLElement = HTMLDivElement>(
|
||||
target: T,
|
||||
name: K,
|
||||
callback: (event: WindowEventMap[K]) => void,
|
||||
options?: boolean | AddEventListenerOptions,
|
||||
): Function;
|
||||
hover(target: HTMLElement, mouseenter?: EventCallback, mouseleave?: EventCallback): Function;
|
||||
loadImg(target: HTMLImageElement | string): Promise<HTMLImageElement>;
|
||||
|
||||
Reference in new issue
Block a user