import type { PitchAlgorithm, TrackType } from '../constants'; import { ResourceObject } from './ResourceObject'; import type { TrackMetadataBase } from './TrackMetadataBase'; export interface Track extends TrackMetadataBase { url: string; type?: TrackType; /** The user agent HTTP header */ userAgent?: string; /** Mime type of the media file */ contentType?: string; /** (iOS only) The pitch algorithm to apply to the sound. */ pitchAlgorithm?: PitchAlgorithm; // eslint-disable-next-line @typescript-eslint/no-explicit-any headers?: { [key: string]: any }; /** * When true, the track won't load or play when it becomes current. * The track stays in the queue but playback is blocked. */ notPlayable?: boolean; /** * Per-track loudness normalization gain as a linear factor (1.0 = unity, * < 1 attenuates, > 1 boosts). Applied by the player as an output gain so all * tracks play at a consistent level and hot masters don't clip over the * Bluetooth/AAC path. On iOS boosts above 1.0 are clamped by the system. */ normalizationGain?: number; // eslint-disable-next-line @typescript-eslint/no-explicit-any [key: string]: any; } export type AddTrack = Track & { url: string | ResourceObject; artwork?: string | ResourceObject; };