import { IAdsRequest } from './ads/sdk/loader/request'; import type { UnifiedError } from './errors/types'; type SourceBufferName = 'video' | 'audio' | 'audiovideo'; export interface BufferAppendedData { type: SourceBufferName; parent?: string; frag?: any; timeRanges: Partial>; } export type { IAdsRequest, UnifiedError }; export interface Stream { id: string; name: string; description: string; organization_id: string; poster?: { original: string; thumb: string; }; } export interface Vod { id: string; title?: string; organization_id: string; thumbnail?: { cover: string; thumb: string; }; } export interface Resource { type: 'live' | 'vod'; resource: Stream | Vod; } export interface MediaSession { host: string; sig: string; } export interface ControlsConfig { viewsCounter?: boolean; disablePause?: boolean; liveRewind?: boolean; autoPlay?: boolean; liveIcon?: boolean; } export interface BrandingConfig { theme?: string; colorScheme?: string; pageTitle?: string; offlineMessage?: string; offlineDescription?: string; } export interface PlayerConfig { controls?: ControlsConfig; branding?: BrandingConfig; } export interface RSession { sid: string; resource: Resource; config?: PlayerConfig; } export interface RegistrationResponse extends RSession { aps: string; } export interface LevelCappingOptions { width?: number; height?: number; bitrate?: number; } export interface StreamPlayerOptions { appId: string; stream_code: string; containerId: string; autoPlay?: boolean; startAt?: number; lowlatenctMode?: boolean; context?: Record; adOptions?: IAdsRequest; levelCapping?: LevelCappingOptions; } export interface Level { id: number; bitrate: number; width: number; height: number; frameRate: number; videoCodec?: string; audioCodec?: string; } export interface AudioTrack { id: number; name: string; lang?: string; groupId?: string; default?: boolean; autoselect?: boolean; channels?: string; audioCodec?: string; } export interface SubtitleTrack { id: number; name: string; lang?: string; groupId?: string; default?: boolean; autoselect?: boolean; forced?: boolean; } export interface ProgressUpdate { position: number; seekStart: number; seekEnd: number; latency?: number; targetLatency?: number; } export interface StreamPlayerEvents { ready: () => void; playing: () => void; paused: () => void; ended: () => void; buffering: () => void; error: (error: UnifiedError) => void; onResourceChange: (resource: Resource) => void; onDataLoaded: (duration: number) => void; volumechange: (volume: number) => void; ratechange: (rate: number) => void; onLevelSwitch: (level: number) => void; onLevelsLoaded: (levels: Level[]) => void; onAudioTracksLoaded: (audioTracks: AudioTrack[]) => void; onAudioTrackSwitch: (trackId: number) => void; onSubtitleTracksLoaded: (subtitleTracks: SubtitleTrack[]) => void; onSubtitleTrackSwitch: (trackId: number) => void; onBufferUpdated: (buffer: BufferAppendedData) => void; onProgressUpdate: (progress: ProgressUpdate) => void; onAdStart: () => void; onAdEnd: () => void; onAdProgress: (progress: { currentTime: number; duration: number; }) => void; onAdError: (error: UnifiedError) => void; onAdClick: () => void; onAdFirstQuartile: () => void; onAdSecondQuartile: () => void; onAdThirdQuartile: () => void; } export interface AnalyticsData { events: Array<{ name: string; timestamp: number; data: object; }>; device: UDevice; version: string; pb_id: string; ow: string; } export interface UDevice { user_agent: string; ua_client_type: string; ua_client_name: string; ua_client_version: string; ua_client_engine: string; ua_client_engine_version: string; ua_device_type: string; ua_device_brand: string; ua_device_model: string; ua_os_name: string; ua_os_version: string; } export interface DeviceInfo extends UDevice { } export interface SecureStorage { get(key: string): Promise; set(key: string, value: string): Promise; remove(key: string): Promise; } //# sourceMappingURL=types.d.ts.map