chore(types): corrected defenition pose of types
changed where each type is defined in types/ dir for consistency and updated related files.
This commit is contained in:
@@ -5,8 +5,7 @@
|
|||||||
* creation: 29/4/2026
|
* creation: 29/4/2026
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { AdapterAPI } from '../types';
|
import { AdapterAPI, AdapterConfig } from '../types';
|
||||||
import { AdapterConfig } from '../types/AdapterAPI';
|
|
||||||
|
|
||||||
type AdapterConstructor = new (
|
type AdapterConstructor = new (
|
||||||
video: HTMLVideoElement,
|
video: HTMLVideoElement,
|
||||||
|
|||||||
@@ -15,17 +15,3 @@ export interface AdapterAPI {
|
|||||||
muted: boolean;
|
muted: boolean;
|
||||||
readonly duration: () => number;
|
readonly duration: () => number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AdapterConfig {
|
|
||||||
native?: boolean;
|
|
||||||
hls?: boolean | HLSOptions;
|
|
||||||
dash?: boolean | DASHOptions;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface HLSOptions {
|
|
||||||
src?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface DASHOptions {
|
|
||||||
src?: string;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -5,8 +5,6 @@
|
|||||||
* creation: 28/4/2026
|
* creation: 28/4/2026
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { AdapterConfig } from './AdapterAPI';
|
|
||||||
|
|
||||||
export interface PlayerConfig {
|
export interface PlayerConfig {
|
||||||
type: 'native' | 'hls' | 'dash';
|
type: 'native' | 'hls' | 'dash';
|
||||||
theme?: 'dark' | 'light';
|
theme?: 'dark' | 'light';
|
||||||
@@ -35,12 +33,16 @@ export interface UIElementConfig {
|
|||||||
enable?: boolean;
|
enable?: boolean;
|
||||||
vPosition?: 'top' | 'middle' | 'bottom';
|
vPosition?: 'top' | 'middle' | 'bottom';
|
||||||
hPosition?: 'left' | 'middle' | 'right';
|
hPosition?: 'left' | 'middle' | 'right';
|
||||||
color?: string | UIElementConfigColor;
|
color?: string | UIElementColorConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface UIElementConfigColor {
|
export interface UIElementColorConfig {
|
||||||
idleColor?: string;
|
idleColor?: string;
|
||||||
activeColor?: string;
|
activeColor?: string;
|
||||||
hoverColor?: string;
|
hoverColor?: string;
|
||||||
disabledColor?: string;
|
disabledColor?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface AdapterConfig {
|
||||||
|
src?: string;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,10 +1,5 @@
|
|||||||
export {
|
export { AdapterAPI } from './AdapterAPI';
|
||||||
AdapterAPI,
|
|
||||||
AdapterConfig,
|
|
||||||
HLSOptions,
|
|
||||||
DASHOptions,
|
|
||||||
} from './AdapterAPI';
|
|
||||||
|
|
||||||
export { PlayerConfig, ControlConfig } from './PlayerConfig';
|
export { PlayerConfig, ControlConfig, AdapterConfig } from './PlayerConfig';
|
||||||
|
|
||||||
export { PlayerEvents } from './PlaybackState';
|
export { PlayerEvents } from './PlaybackState';
|
||||||
|
|||||||
Reference in New Issue
Block a user