refactor: update export syntax to default for ASR and VAST plugins

This commit is contained in:
Harvey Zack committed 2025-08-03 18:49:06 +08:00
1 parent 6f3363014f
commit 8a87de6df3
2 files changed
+5 -7

No files matched your search

+2 -3
View File
@@ -1,6 +1,3 @@
export = artplayerPluginAsr
export as namespace artplayerPluginAsr;
interface AudioChunk { interface AudioChunk {
pcm: ArrayBuffer pcm: ArrayBuffer
wav: ArrayBuffer wav: ArrayBuffer
@@ -23,5 +20,7 @@ interface AsrPluginInstance {
declare function artplayerPluginAsr(option?: AsrPluginOption): (art: Artplayer) => AsrPluginInstance declare function artplayerPluginAsr(option?: AsrPluginOption): (art: Artplayer) => AsrPluginInstance
export default artplayerPluginAsr
export = artplayerPluginAsr; export = artplayerPluginAsr;
export as namespace artplayerPluginAsr; export as namespace artplayerPluginAsr;
+3 -4
View File
@@ -1,6 +1,3 @@
export = artplayerPluginVast
export as namespace artplayerPluginVast;
declare global { declare global {
interface Window { interface Window {
artplayerPluginVast?: typeof artplayerPluginVast artplayerPluginVast?: typeof artplayerPluginVast
@@ -12,7 +9,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
@@ -30,5 +27,7 @@ declare function artplayerPluginVast(
option: ArtplayerPluginVastOption, option: ArtplayerPluginVastOption,
): (art: Artplayer) => ArtplayerPluginVastInstance ): (art: Artplayer) => ArtplayerPluginVastInstance
export default artplayerPluginVast
export = artplayerPluginVast; export = artplayerPluginVast;
export as namespace artplayerPluginVast; export as namespace artplayerPluginVast;