mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-11 22:06:17 -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.
27 lines
585 B
TypeScript
27 lines
585 B
TypeScript
interface AudioChunk {
|
|
pcm: ArrayBuffer
|
|
wav: ArrayBuffer
|
|
}
|
|
|
|
interface AsrPluginOption {
|
|
length?: number
|
|
interval?: number
|
|
sampleRate?: number
|
|
autoHideTimeout?: number
|
|
onAudioChunk?: (chunk: AudioChunk) => void | Promise<void>
|
|
}
|
|
|
|
interface AsrPluginInstance {
|
|
name: 'artplayerPluginAsr'
|
|
stop: () => void
|
|
hide: () => void
|
|
append: (subtitle: string) => void
|
|
}
|
|
|
|
declare function artplayerPluginAsr(option?: AsrPluginOption): (art: Artplayer) => AsrPluginInstance
|
|
|
|
export default artplayerPluginAsr
|
|
|
|
export = artplayerPluginAsr
|
|
export as namespace artplayerPluginAsr;
|