mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-28 18:41:20 -08:00
Update artplayer-plugin-chromecast.d.ts
This commit is contained in:
1 parent
aa5dbd0418
commit
3ca3a3b781
1 file changed
+9
-44
+9
-44
@@ -1,52 +1,17 @@
|
|||||||
import type Artplayer from 'artplayer';
|
import type Artplayer from 'artplayer';
|
||||||
|
|
||||||
export = artplayerPluginAds;
|
export = artplayerPluginChromecast;
|
||||||
export as namespace artplayerPluginAds;
|
export as namespace artplayerPluginChromecast;
|
||||||
|
|
||||||
type Option = {
|
type Option = {
|
||||||
/**
|
url?: string;
|
||||||
* 广告源文本,支持视频链接、图片链接、HTML文本
|
sdk?: string;
|
||||||
*/
|
icon?: string;
|
||||||
source: string;
|
mimeType?: string;
|
||||||
|
|
||||||
/**
|
|
||||||
* 知名广告的类型:'video' | 'image' | 'html'
|
|
||||||
*/
|
|
||||||
type: 'video' | 'image' | 'html';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 广告必看的时长,单位为秒
|
|
||||||
*/
|
|
||||||
playDuration?: number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 广告总的时长,单位为秒
|
|
||||||
*/
|
|
||||||
totalDuration?: number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 视频广告是否默认静音
|
|
||||||
*/
|
|
||||||
muted?: boolean;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
type Ads = {
|
type Chromecast = {
|
||||||
name: 'artplayerPluginAds';
|
name: 'artplayerPluginChromecast';
|
||||||
|
|
||||||
/**
|
|
||||||
* 跳过广告
|
|
||||||
*/
|
|
||||||
skip: () => void;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 暂停广告
|
|
||||||
*/
|
|
||||||
pause: () => void;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 播放广告
|
|
||||||
*/
|
|
||||||
play: () => void;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
declare const artplayerPluginAds: (option: Option) => (art: Artplayer) => Ads;
|
declare const artplayerPluginChromecast: (option: Option) => (art: Artplayer) => Chromecast;
|
||||||
Reference in new issue
Block a user