remove ads

This commit is contained in:
Harvey committed 2022-06-20 10:09:20 +08:00
1 parent 92f751250e
commit 7bbe1ed0be
16 files changed
+14 -282

No files matched your search

+3 -24
View File
@@ -172,9 +172,9 @@ type Component = {
add(option: ComponentOption): HTMLElement;
};
type PluginFunction = (art: Artplayer) => any;
type WhitelistFunction = (ua: string) => Boolean;
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 EventCallback = (event: Event) => any;
type SubtitleOption = {
@@ -199,13 +199,6 @@ type SubtitleOption = {
encoding?: string;
};
type AdsOption = {
/**
* The ads video url
*/
url: string;
};
type Option = {
/**
* The container mounted by the player
@@ -382,11 +375,6 @@ type Option = {
*/
whitelist?: (string | WhitelistFunction | RegExp)[];
/**
* Custom ads list
*/
ads?: AdsOption[];
/**
* Custom layer list
*/
@@ -731,6 +719,7 @@ declare class Artplayer extends Player {
readonly plugins: {
readonly id: number;
add(plugin: PluginFunction): Artplayer['plugins'];
[pluginName: string]: any;
};
readonly i18n: {
@@ -756,16 +745,6 @@ declare class Artplayer extends Player {
switch(url: string, option?: SubtitleOption): Promise<string>;
};
readonly ads: {
index: number;
isEnd: boolean;
playing: boolean;
current: AdsOption;
prev: AdsOption;
next: AdsOption;
end(): void;
};
readonly mobile: object;
readonly player: Player;