mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-16 09:36:16 -08:00
- Created a new documentation file for the danmuku plugin with code examples. - Added comprehensive language settings documentation, including default languages, importing languages, adding new languages, and modifying existing languages. - Updated the i18n setup examples to reflect the latest changes in language handling.
34 lines
813 B
TypeScript
34 lines
813 B
TypeScript
export = artplayerPluginVast
|
|
export as namespace artplayerPluginVast;
|
|
|
|
declare global {
|
|
interface Window {
|
|
artplayerPluginVast?: typeof artplayerPluginVast
|
|
}
|
|
}
|
|
|
|
type PlayUrlFn = (url: string) => void
|
|
type PlayResFn = (res: string) => void
|
|
|
|
interface VastPluginContext {
|
|
art: Artplayer
|
|
ima: typeof google.ima
|
|
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 = artplayerPluginVast;
|
|
export as namespace artplayerPluginVast; |