mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-16 09:36:16 -08:00
feat: add danmuku plugin and i18n setup documentation - Introduced a new danmuku plugin with multiple run code options in the documentation. - Added language settings documentation for i18n, including default languages, import instructions, and examples for adding and modifying languages. - Implemented input handling for media sources in the artplayer-proxy-mediabunny package, supporting various formats including HLS. - Created m3u8 control functionalities for managing audio and video quality settings in the player. Update mediabunny.js
110 lines
1.9 KiB
TypeScript
110 lines
1.9 KiB
TypeScript
interface Option {
|
|
m3u8?: {
|
|
quality?: {
|
|
control?: boolean
|
|
setting?: boolean
|
|
title?: string
|
|
auto?: string
|
|
getName?: (level: {
|
|
id: number
|
|
index: number
|
|
name: null | string
|
|
height: number
|
|
bitrate: number
|
|
}) => string
|
|
}
|
|
audio?: {
|
|
control?: boolean
|
|
setting?: boolean
|
|
title?: string
|
|
auto?: string
|
|
getName?: (track: {
|
|
id: number
|
|
index: number
|
|
name: null | string
|
|
lang: string
|
|
language: string
|
|
bitrate: number
|
|
}) => string
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Timeout for loading media in milliseconds
|
|
* @default 0
|
|
*/
|
|
loadTimeout?: number
|
|
|
|
/**
|
|
* Interval for timeupdate events in milliseconds
|
|
* @default 250
|
|
*/
|
|
timeupdateInterval?: number
|
|
|
|
/**
|
|
* Audio-video synchronization tolerance in seconds
|
|
* @default 0.12
|
|
*/
|
|
avSyncTolerance?: number
|
|
|
|
/**
|
|
* Whether to drop late video frames
|
|
* @default false
|
|
*/
|
|
dropLateFrames?: boolean
|
|
|
|
/**
|
|
* Poster image URL
|
|
*/
|
|
poster?: string
|
|
|
|
/**
|
|
* Media source (URL, Blob, or ReadableStream)
|
|
*/
|
|
source?: string | Blob | ReadableStream<Uint8Array>
|
|
|
|
/**
|
|
* Check if server supports range requests before loading
|
|
* @default false
|
|
*/
|
|
preflightRange?: boolean
|
|
|
|
/**
|
|
* Initial volume (0-1)
|
|
* @default 0.7
|
|
*/
|
|
volume?: number
|
|
|
|
/**
|
|
* Initial muted state
|
|
* @default false
|
|
*/
|
|
muted?: boolean
|
|
|
|
/**
|
|
* Autoplay
|
|
* @default false
|
|
*/
|
|
autoplay?: boolean
|
|
|
|
/**
|
|
* Loop playback
|
|
* @default false
|
|
*/
|
|
loop?: boolean
|
|
|
|
/**
|
|
* Cross-origin setting
|
|
*/
|
|
crossOrigin?: string
|
|
}
|
|
|
|
type Result = HTMLCanvasElement
|
|
|
|
declare const artplayerProxyMediabunny: (option?: Option) => (art: Artplayer) => Result
|
|
|
|
export default artplayerProxyMediabunny
|
|
|
|
export = artplayerProxyMediabunny
|
|
export as namespace artplayerProxyMediabunny;
|