mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-23 22:01:20 -08:00
refactor: update export syntax to default for ASR and VAST plugins
This commit is contained in:
1 parent
fa755b5f61
commit
6f3363014f
2 files changed
+5
-7
No files matched your search
@@ -1,8 +1,5 @@
|
|||||||
import type Artplayer from 'artplayer'
|
import type Artplayer from 'artplayer'
|
||||||
|
|
||||||
export = artplayerPluginAsr
|
|
||||||
export as namespace artplayerPluginAsr;
|
|
||||||
|
|
||||||
interface AudioChunk {
|
interface AudioChunk {
|
||||||
pcm: ArrayBuffer
|
pcm: ArrayBuffer
|
||||||
wav: ArrayBuffer
|
wav: ArrayBuffer
|
||||||
@@ -24,3 +21,5 @@ interface AsrPluginInstance {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare function artplayerPluginAsr(option?: AsrPluginOption): (art: Artplayer) => AsrPluginInstance
|
declare function artplayerPluginAsr(option?: AsrPluginOption): (art: Artplayer) => AsrPluginInstance
|
||||||
|
|
||||||
|
export default artplayerPluginAsr
|
||||||
@@ -1,9 +1,6 @@
|
|||||||
import type { Player } from '@glomex/vast-ima-player'
|
import type { Player } from '@glomex/vast-ima-player'
|
||||||
import type Artplayer from 'artplayer'
|
import type Artplayer from 'artplayer'
|
||||||
|
|
||||||
export = artplayerPluginVast
|
|
||||||
export as namespace artplayerPluginVast;
|
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface Window {
|
interface Window {
|
||||||
artplayerPluginVast?: typeof artplayerPluginVast
|
artplayerPluginVast?: typeof artplayerPluginVast
|
||||||
@@ -15,7 +12,7 @@ type PlayResFn = (res: string) => void
|
|||||||
|
|
||||||
interface VastPluginContext {
|
interface VastPluginContext {
|
||||||
art: Artplayer
|
art: Artplayer
|
||||||
ima: typeof google.ima
|
ima: any // Replace 'any' with a more specific type if available, or declare google.ima type above
|
||||||
imaPlayer: Player
|
imaPlayer: Player
|
||||||
playUrl: PlayUrlFn
|
playUrl: PlayUrlFn
|
||||||
playRes: PlayResFn
|
playRes: PlayResFn
|
||||||
@@ -32,3 +29,5 @@ export interface ArtplayerPluginVastInstance {
|
|||||||
declare function artplayerPluginVast(
|
declare function artplayerPluginVast(
|
||||||
option: ArtplayerPluginVastOption,
|
option: ArtplayerPluginVastOption,
|
||||||
): (art: Artplayer) => ArtplayerPluginVastInstance
|
): (art: Artplayer) => ArtplayerPluginVastInstance
|
||||||
|
|
||||||
|
export default artplayerPluginVast
|
||||||
Reference in new issue
Block a user