import type { ParsedSource, QualityLevel } from '@vizor-vr/shared'; import type { PlayerState } from '../core/player-state.js'; import type { VzEventEmitter } from '../core/event-emitter.js'; import type { DrmContext } from './types.js'; /** * Manages source selection and streaming adapter lifecycle. * * Responsibilities: * - Detect MIME type to determine adapter type (progressive/hls/dash) * - Instantiate the correct adapter via lazy-loaded factory * - Coordinate quality switching with PlayerState * - Handle multi-source progressive switching (preserves currentTime) */ export declare class SourceManager { private adapter; private videoElement; private state; private events; private sources; private drm; /** * Load sources into the video element using the appropriate adapter. */ loadSources(sources: ParsedSource[], videoElement: HTMLVideoElement, state: PlayerState, events: VzEventEmitter, drm?: DrmContext): Promise; /** Get available quality levels from the current adapter */ getQualityLevels(): QualityLevel[]; /** Set quality level (-1 for auto) */ setQualityLevel(index: number): void; /** Whether the current adapter supports ABR */ get supportsABR(): boolean; /** Switch to a different progressive source by index (preserves currentTime) */ switchSource(index: number): void; /** Dispose the adapter and release resources */ dispose(): void; /** * Select the best source and adapter type. * Prefers adaptive (HLS/DASH) over progressive when available. */ private selectSource; /** Detect adapter type from source MIME type or URL extension */ private detectAdapterType; /** * Poll for quality levels after a short delay. * Adaptive adapters need time to parse the manifest before levels are available. */ private pollQualityLevels; } //# sourceMappingURL=source-manager.d.ts.map