export type VariantRung = { height?: number; width?: number; bandwidth?: number; average_bandwidth?: number; bitrate_kbps?: number; segment_count?: number; encode_seconds?: number; resolution?: string; codecs?: string; }; export type StreamingVariantBase = { cdn_master_playlist_url?: string; cdn_manifest_url?: string; origin_master_playlist_url?: string; origin_manifest_url?: string; full_size?: string; rungs?: VariantRung[]; metadata?: { format?: 'HLS' | 'DASH' | 'MP4' | 'WebM' | string; duration?: number; segment_duration?: number; segments_total?: number; resolution?: string; bitrate?: number; codecs?: string; segments_count?: number; segments_size?: number; }; }; export type ProgressiveSizes = Partial>; export type Variants = { HLS?: StreamingVariantBase; DASH?: StreamingVariantBase; PROGRESSIVE_MP4?: ProgressiveSizes; WEBM?: ProgressiveSizes; }; export interface VideoVariantsData { variants: Variants; metadata?: { width?: number; height?: number; }; } export interface VideoData { id: number; name?: string; media_type?: string; poster_url?: string | null; fallback_url?: string; meta?: Record & { duration?: number; duration_iso8601?: string; content_manifest?: { optimized_filename?: string; title?: string; summary?: string; description?: string; }; }; variants_data: VideoVariantsData; } export type BrowserCapabilities = { canPlayHLS: boolean; supportsMSE: boolean; canPlayWebM: boolean; canPlayAV1: boolean; hasHardwareAcceleration: boolean; }; export type SelectedSource = { src: string; type: string; method: "native_hls" | "progressive_webm" | "progressive_mp4" | "dash" | "hls" | "fallback"; adaptiveBitrate?: boolean; upgradeToStreaming?: boolean; }; export type PreferredCodec = "HLS" | "DASH" | "WEBM" | "MP4"; export type PreferredSize = "sm" | "md" | "lg" | "full";