import { MetadataOptions, PlayerOptions, Event, Track, State, TrackMetadataBase, NowPlayingMetadata, RepeatMode } from './interfaces'; /** * Initializes the player with the specified options. */ declare function setupPlayer(options?: PlayerOptions): Promise; declare function destroy(): Promise; declare type ServiceHandler = () => Promise; /** * Register the playback service. The service will run as long as the player runs. */ declare function registerPlaybackService(factory: () => ServiceHandler): void; declare function addEventListener(event: Event, listener: (data: any) => void): import("react-native").EmitterSubscription; /** * @deprecated This method should not be used, most methods reject when service is not bound. */ declare function isServiceRunning(): Promise; /** * Adds one or more tracks to the queue. */ declare function add(tracks: Track | Track[], insertBeforeIndex?: number): Promise; /** * Removes one or more tracks from the queue. */ declare function remove(tracks: number | number[]): Promise; /** * Clears any upcoming tracks from the queue. */ declare function removeUpcomingTracks(): Promise; /** * Skips to a track in the queue. */ declare function skip(trackIndex: number, initialPosition?: number): Promise; /** * Skips to the next track in the queue. */ declare function skipToNext(initialPosition?: number): Promise; /** * Skips to the previous track in the queue. */ declare function skipToPrevious(initialPosition?: number): Promise; /** * Updates the configuration for the components. */ declare function updateOptions(options?: MetadataOptions): Promise; /** * Updates the metadata of a track in the queue. If the current track is updated, * the notification and the Now Playing Center will be updated accordingly. */ declare function updateMetadataForTrack(trackIndex: number, metadata: TrackMetadataBase): Promise; declare function clearNowPlayingMetadata(): Promise; declare function updateNowPlayingMetadata(metadata: NowPlayingMetadata): Promise; /** * Resets the player stopping the current track and clearing the queue. */ declare function reset(): Promise; /** * Plays or resumes the current track. */ declare function play(): Promise; /** * Pauses the current track. */ declare function pause(): Promise; /** * Stops the current track. */ declare function stop(): Promise; /** * Seeks to a specified time position in the current track. */ declare function seekTo(position: number): Promise; /** * Sets the volume of the player. */ declare function setVolume(level: number): Promise; /** * Sets the playback rate. */ declare function setRate(rate: number): Promise; /** * Sets the repeat mode. */ declare function setRepeatMode(mode: RepeatMode): Promise; /** * Gets the volume of the player (a number between 0 and 1). */ declare function getVolume(): Promise; /** * Gets the playback rate, where 1 is the regular speed. */ declare function getRate(): Promise; /** * Gets a track object from the queue. */ declare function getTrack(trackIndex: number): Promise; /** * Gets the whole queue. */ declare function getQueue(): Promise; /** * Gets the index of the current track. */ declare function getCurrentTrack(): Promise; /** * Gets the duration of the current track in seconds. */ declare function getDuration(): Promise; /** * Gets the buffered position of the player in seconds. */ declare function getBufferedPosition(): Promise; /** * Gets the position of the player in seconds. */ declare function getPosition(): Promise; /** * Gets the state of the player. */ declare function getState(): Promise; /** * Gets the repeat mode. */ declare function getRepeatMode(): Promise; declare const _default: { setupPlayer: typeof setupPlayer; destroy: typeof destroy; registerPlaybackService: typeof registerPlaybackService; addEventListener: typeof addEventListener; isServiceRunning: typeof isServiceRunning; add: typeof add; remove: typeof remove; removeUpcomingTracks: typeof removeUpcomingTracks; skip: typeof skip; skipToNext: typeof skipToNext; skipToPrevious: typeof skipToPrevious; updateOptions: typeof updateOptions; updateMetadataForTrack: typeof updateMetadataForTrack; clearNowPlayingMetadata: typeof clearNowPlayingMetadata; updateNowPlayingMetadata: typeof updateNowPlayingMetadata; reset: typeof reset; play: typeof play; pause: typeof pause; stop: typeof stop; seekTo: typeof seekTo; setVolume: typeof setVolume; setRate: typeof setRate; setRepeatMode: typeof setRepeatMode; getVolume: typeof getVolume; getRate: typeof getRate; getTrack: typeof getTrack; getQueue: typeof getQueue; getCurrentTrack: typeof getCurrentTrack; getDuration: typeof getDuration; getBufferedPosition: typeof getBufferedPosition; getPosition: typeof getPosition; getState: typeof getState; getRepeatMode: typeof getRepeatMode; }; export default _default;