mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 10:56:15 -08:00
34 lines
854 B
TypeScript
34 lines
854 B
TypeScript
declare global {
|
|
interface Window {
|
|
artplayerPluginVast?: typeof artplayerPluginVast
|
|
}
|
|
}
|
|
|
|
type PlayUrlFn = (url: string) => void
|
|
type PlayResFn = (res: string) => void
|
|
|
|
interface VastPluginContext {
|
|
art: Artplayer
|
|
ima: any // Replace 'any' with a more specific type if available, or declare google.ima type above
|
|
imaPlayer: Player
|
|
playUrl: PlayUrlFn
|
|
playRes: PlayResFn
|
|
container: HTMLDivElement | null
|
|
}
|
|
|
|
export type ArtplayerPluginVastOption = (params: VastPluginContext) => void | Promise<void>
|
|
|
|
export interface ArtplayerPluginVastInstance {
|
|
name: 'artplayerPluginVast'
|
|
destroy?: () => void
|
|
}
|
|
|
|
declare function artplayerPluginVast(
|
|
option: ArtplayerPluginVastOption,
|
|
): (art: Artplayer) => ArtplayerPluginVastInstance
|
|
|
|
export default artplayerPluginVast
|
|
|
|
export = artplayerPluginVast
|
|
export as namespace artplayerPluginVast;
|