mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-11 05:26:15 -08:00
- Created a new documentation file for the danmuku plugin with code examples. - Added a comprehensive guide for language settings (i18n) including default languages, importing languages, adding new languages, and modifying existing languages. - Included code snippets for initializing the Artplayer with different language configurations.
37 lines
879 B
TypeScript
37 lines
879 B
TypeScript
declare global {
|
|
interface Window {
|
|
artplayerPluginVast?: typeof artplayerPluginVast
|
|
}
|
|
}
|
|
|
|
type PlayUrlFn = (url: string, config?: any) => void
|
|
type PlayResFn = (res: string, config?: any) => void
|
|
|
|
interface VastPluginContext {
|
|
art: Artplayer
|
|
ima: any
|
|
imaPlayer: Player | null
|
|
playUrl: PlayUrlFn
|
|
playRes: PlayResFn
|
|
init: () => Player
|
|
adsRenderingSettings: any
|
|
playerOptions: PlayerOptions
|
|
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;
|