import { type ServiceContext, type Logger } from './ServiceContext'; import { type PlayerStatus, type PlayerStatusProvider } from './PlayerStatusProvider'; import { type PlayerControl } from './PlayerControl'; import { EventEmitter } from 'events'; export interface VolumioStateManagerOptions { context: ServiceContext; control: PlayerControl; statusProvider: PlayerStatusProvider; logger: Logger; } export interface TrackInfo { uri: string; streamUrl: string; title?: string; artist?: string; album?: string; albumart?: string; trackType?: string; duration?: number; samplerate?: string; bitdepth?: string; bitrate?: string; channels?: number; stream?: boolean; } export interface ObservedState { status: 'play' | 'pause' | 'stop'; title?: string; artist?: string; album?: string; albumart?: string; uri: string; trackType?: string; seek?: number; duration?: number; samplerate?: string; bitdepth?: string; bitrate?: string; channels?: number; } export interface VolumioState extends ObservedState { service: string; volume?: number; dbVolume?: number; disableVolumeControl?: boolean; mute?: boolean; stream?: boolean; repeat?: boolean; repeatSingle?: boolean; random?: boolean; } export interface UnsetVolatileInfo { /** * Boolean indicating whether the stop() method was called to trigger the * unsetVolatile event, or if it was triggered by some other means (e.g. * another service taking over or stop occurring naturally as a result of * playback reaching the end of track). */ stopCalled: boolean; /** * Boolean indicating whether the next() method was called. As part of * the next() process, stop() will be called, thereby triggering this event. */ nextCalled: boolean; } export declare class VolumioStateManager extends EventEmitter { #private; constructor(options: VolumioStateManagerOptions); prepareForPlayback(trackInfo: TrackInfo): Promise; protected getObservedStateFromPlayerStatus(status: S): ObservedState; dispose(): void; unsetVolatile(): void; onUnsetVolatile(): void; isCurrentServiceAndVolatile(): boolean; setRepeat(value: boolean, repeatSingle?: boolean): Promise; setRandom(value: boolean): void; emit(eventName: 'setVolatile'): boolean; emit(eventName: 'unsetVolatile', info: UnsetVolatileInfo): boolean; on(eventName: 'setVolatile', listener: () => void): this; on(eventName: 'unsetVolatile', listener: (info: UnsetVolatileInfo) => void): this; once(eventName: 'setVolatile', listener: () => void): this; once(eventName: 'unsetVolatile', listener: (info: UnsetVolatileInfo) => void): this; off(eventName: 'setVolatile', listener: () => void): this; off(eventName: 'unsetVolatile', listener: (info: UnsetVolatileInfo) => void): this; } //# sourceMappingURL=VolumioStateManager.d.ts.map