Update ads docs

This commit is contained in:
Harvey committed 2021-12-23 16:42:26 +08:00
1 parent b584550917
commit 75baca8462
7 files changed
+198 -14

No files matched your search

+18 -6
View File
@@ -139,6 +139,13 @@ type SubtitleOption = {
bilingual?: boolean;
};
type AdsOption = {
/**
* The ads video url
*/
url: string;
};
type Option = {
/**
* The container mounted by the player
@@ -308,12 +315,7 @@ type Option = {
/**
* Custom ads list
*/
ads?: {
/**
* The ads video url
*/
url: string;
}[];
ads?: AdsOption[];
/**
* Custom layer list
@@ -654,6 +656,16 @@ 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;