import { EventBus } from '../events/EventBus'; import { HMSSdk } from '../index'; import { HMSPlaylistItem, HMSPlaylistManager, HMSPlaylistProgressEvent, HMSPlaylistType } from '../interfaces'; import { TypedEventEmitter } from '../utils/typed-event-emitter'; export declare class PlaylistManager extends TypedEventEmitter<{ newTrackStart: HMSPlaylistItem; playlistEnded: HMSPlaylistType; currentTrackEnded: HMSPlaylistItem; }> implements HMSPlaylistManager { private sdk; private eventBus; private state; private audioManager; private videoManager; private readonly TAG; constructor(sdk: HMSSdk, eventBus: EventBus); getList(type?: HMSPlaylistType): HMSPlaylistItem[]; setList(list: HMSPlaylistItem[]): void; clearList(type: HMSPlaylistType): Promise; removeItem(id: string, type: HMSPlaylistType): Promise; seek(value: number, type?: HMSPlaylistType): void; seekTo(value: number, type?: HMSPlaylistType): void; setVolume(value: number, type?: HMSPlaylistType): void; getVolume(type?: HMSPlaylistType): number; getCurrentTime(type?: HMSPlaylistType): number; getCurrentIndex(type?: HMSPlaylistType): number; getCurrentProgress(type?: HMSPlaylistType): number; getCurrentSelection(type?: HMSPlaylistType): HMSPlaylistItem | undefined; isPlaying(type?: HMSPlaylistType): boolean; setIsAutoplayOn(type: HMSPlaylistType | undefined, autoplay: boolean): void; getPlaybackRate(type?: HMSPlaylistType): number; setPlaybackRate(type: HMSPlaylistType | undefined, value: number): void; setEnabled(enabled: boolean, { id, type }: { id: string; type: HMSPlaylistType; }): Promise; playNext(type?: HMSPlaylistType): Promise; playPrevious(type?: HMSPlaylistType): Promise; stop(type?: HMSPlaylistType): Promise; cleanup(): void; onProgress(fn: (progress: HMSPlaylistProgressEvent) => void): void; onNewTrackStart(fn: (item: HMSPlaylistItem) => void): void; onPlaylistEnded(fn: (type: HMSPlaylistType) => void): void; onCurrentTrackEnded(fn: (item: HMSPlaylistItem) => void): void; private getElement; private removeTracks; private play; private isItemCurrentlyPlaying; private setDuration; private pause; private handlePausePlaylist; private addListeners; /** * Remove tracks if reached the end of list otherwise play next * @param {HMSPlaylistType} type */ private handleEnded; private addTrack; private removeTrack; }