mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-20 20:21:20 -08:00
refactor(vast): [PKG-VAST-04] retain published types and add accurate runtime declarations
This commit is contained in:
1 parent
c162d2b3b3
commit
e5c73fa620
34 files changed
+7819
-1495
No files matched your search
@@ -1,30 +1,6 @@
|
||||
import type { google, ImaSdk } from '@alugha/ima'
|
||||
import type { Player, PlayerOptions } from '@glomex/vast-ima-player'
|
||||
import type Artplayer from 'artplayer'
|
||||
import type { WorkspaceContext } from '../types/runtime-api.js'
|
||||
|
||||
export type Utilities = Pick<typeof Artplayer.utils, 'createElement' | 'setStyles'>
|
||||
export type RequestConfig = Record<string, unknown>
|
||||
|
||||
export interface CompatibilityOptions {
|
||||
compatibility?: 'workspace-1.2'
|
||||
}
|
||||
|
||||
export interface Context {
|
||||
art: Artplayer
|
||||
playUrl: (url: string, config?: RequestConfig) => void
|
||||
playRes: (response: string, config?: RequestConfig) => void
|
||||
init: () => Player | null
|
||||
ima: ImaSdk
|
||||
adsRenderingSettings: google.ima.AdsRenderingSettings
|
||||
playerOptions: PlayerOptions
|
||||
readonly imaPlayer: Player | null
|
||||
readonly id: string | null
|
||||
readonly $container: HTMLDivElement | null
|
||||
readonly container: HTMLDivElement | null
|
||||
}
|
||||
|
||||
export type Callback = (context: Context) => unknown
|
||||
export interface Result {
|
||||
name: 'artplayerPluginVast'
|
||||
destroy: () => void
|
||||
}
|
||||
export type { CompatibilityOptions, WorkspaceContext as Context, RequestConfig, RuntimeResult as Result } from '../types/runtime-api.js'
|
||||
export type Callback = (context: WorkspaceContext) => unknown
|
||||
Reference in new issue
Block a user