mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 14:41:20 -08:00
refactor(hls): [PKG-HLS-04] migrate modules and compatible types
This commit is contained in:
1 parent
ba93b98be5
commit
2f9bee4ee0
34 files changed
+4860
-88
No files matched your search
+39
-13
@@ -1,17 +1,43 @@
|
||||
interface Config {
|
||||
control?: boolean
|
||||
setting?: boolean
|
||||
title?: string
|
||||
auto?: string
|
||||
getName?: (level: object) => string
|
||||
// Generated from the package public declaration by yarn build:ts. Do not edit.
|
||||
/* eslint-disable ts/no-redeclare -- Callable and public type namespace intentionally merge. */
|
||||
declare namespace artplayerPluginHlsControlDefinitions {
|
||||
export interface QualityLevel {
|
||||
height: number
|
||||
name?: string
|
||||
}
|
||||
export interface AudioTrack {
|
||||
id: number
|
||||
name: string
|
||||
lang?: string
|
||||
language?: string
|
||||
}
|
||||
export interface Config<Item extends object = object> {
|
||||
control?: boolean
|
||||
setting?: boolean
|
||||
title?: string
|
||||
auto?: string
|
||||
/** Plain callback; current-label calls omit index. SDK objects retain their identity. */
|
||||
getName?: (item: Item, index?: number) => string
|
||||
}
|
||||
export interface Option<Level extends object = QualityLevel, Track extends object = AudioTrack> {
|
||||
quality?: Config<Level>
|
||||
audio?: Config<Track>
|
||||
}
|
||||
export interface Result {
|
||||
name: 'artplayerPluginHlsControl'
|
||||
update: () => void
|
||||
}
|
||||
export function artplayerPluginHlsControl<Level extends object = QualityLevel, Track extends object = AudioTrack>(option?: Option<Level, Track>): (art: Artplayer) => Result
|
||||
// Keep the required last signature for historical Parameters<typeof factory>[0] consumers.
|
||||
export function artplayerPluginHlsControl<Level extends object = QualityLevel, Track extends object = AudioTrack>(option: Option<Level, Track>): (art: Artplayer) => Result
|
||||
}
|
||||
|
||||
declare const artplayerPluginHlsControl: (option: { quality?: Config, audio?: Config }) => (art: Artplayer) => {
|
||||
name: 'artplayerPluginHlsControl'
|
||||
update: () => void
|
||||
declare const artplayerPluginHlsControl: typeof artplayerPluginHlsControlDefinitions.artplayerPluginHlsControl
|
||||
declare namespace artplayerPluginHlsControl {
|
||||
export type QualityLevel = artplayerPluginHlsControlDefinitions.QualityLevel
|
||||
export type AudioTrack = artplayerPluginHlsControlDefinitions.AudioTrack
|
||||
export type Config<Item extends object = object> = artplayerPluginHlsControlDefinitions.Config<Item>
|
||||
export type Option<Level extends object = QualityLevel, Track extends object = AudioTrack> = artplayerPluginHlsControlDefinitions.Option<Level, Track>
|
||||
export type Result = artplayerPluginHlsControlDefinitions.Result
|
||||
}
|
||||
|
||||
export default artplayerPluginHlsControl
|
||||
|
||||
export = artplayerPluginHlsControl
|
||||
export as namespace artplayerPluginHlsControl;
|
||||
Reference in new issue
Block a user