@werk1/w1-system-videoblock
Version:
Universal video player supporting YouTube, Vimeo, HLS, DASH with coordination and GSAP integration for W1 System
30 lines (29 loc) • 837 B
TypeScript
/**
* DASH Platform Integration
* Handles Dash.js library loading and DASH stream management
*/
export interface DashPlayer {
initialize(video: HTMLVideoElement, src: string, autoStart?: boolean): void;
attachSource(src: string): void;
reset(): void;
destroy(): void;
on(event: string, callback: (event: any) => void): void;
off(event: string, callback?: (event: any) => void): void;
getVideoElement(): HTMLVideoElement | null;
isReady(): boolean;
}
declare global {
interface Window {
dashjs?: {
MediaPlayer: () => DashPlayer;
};
}
}
/**
* Loads the Dash.js library
*/
export declare function loadDashLibrary(): Promise<boolean>;
/**
* Sets up DASH playback
*/
export declare function setupDashPlayback(video: HTMLVideoElement, src: string): DashPlayer | null;