Methods
addListener
-
Type parameters
-
K: "playerStateChanged" | "playerContextChanged" | "remoteDisconnected" | "remoteConnected"
Parameters
Returns EmitterSubscription
connect
- connect(accessToken: string): Promise<void>
-
Parameters
Returns Promise<void>
disconnect
- disconnect(): Promise<void>
emit
-
Type parameters
-
K: "playerStateChanged" | "playerContextChanged" | "remoteDisconnected" | "remoteConnected"
Parameters
Returns void
eventNames
- eventNames(): ("playerStateChanged" | "playerContextChanged" | "remoteDisconnected" | "remoteConnected")[]
-
Returns ("playerStateChanged" | "playerContextChanged" | "remoteDisconnected" | "remoteConnected")[]
getContentItemForUri
- getContentItemForUri(uri: string): Promise<undefined | ContentItem>
getRecommendedContentItems
getRootContentItems
- getRootContentItems(type?: "default" | "fitness" | "navigation"): Promise<ContentItem[]>
-
Parameters
-
Optional type: "default" | "fitness" | "navigation"
isConnectedAsync
- isConnectedAsync(): Promise<boolean>
listenerCount
- listenerCount<K>(type: K): number
-
Type parameters
-
K: "playerStateChanged" | "playerContextChanged" | "remoteDisconnected" | "remoteConnected"
Parameters
Returns number
off
-
Type parameters
-
K: "playerStateChanged" | "playerContextChanged" | "remoteDisconnected" | "remoteConnected"
Parameters
Returns void
on
-
Type parameters
-
K: "playerStateChanged" | "playerContextChanged" | "remoteDisconnected" | "remoteConnected"
Parameters
Returns EmitterSubscription
playItem
-
Parameters
Returns Promise<void>
playItemWithIndex
- playItemWithIndex(item: ContentItem, skipToTrackIndex: number): Promise<void>
-
Parameters
Returns Promise<void>
playUri
- playUri(spotifyUri: string): Promise<void>
-
Parameters
Returns Promise<void>
queueUri
- queueUri(spotifyUri: string): Promise<void>
-
Parameters
Returns Promise<void>
removeAllListeners
- removeAllListeners<K>(event?: K): void
-
Type parameters
-
K: "playerStateChanged" | "playerContextChanged" | "remoteDisconnected" | "remoteConnected"
Parameters
Returns void
removeListener
-
Type parameters
-
K: "playerStateChanged" | "playerContextChanged" | "remoteDisconnected" | "remoteConnected"
Parameters
Returns void
seek
- seek(positionMs: number): Promise<void>
-
Parameters
Returns Promise<void>
setPlaying
- setPlaying(playing: boolean): Promise<void>
-
Parameters
Returns Promise<void>
setRepeatMode
-
Parameters
Returns Promise<void>
setShuffling
- setShuffling(shuffling: boolean): Promise<void>
-
Parameters
Returns Promise<void>
skipToNext
- skipToNext(): Promise<void>
skipToPrevious
- skipToPrevious(): Promise<void>
The Spotify Remote Api allows remote control of Spotify Application
See the example shown for SpotifyAuth
SpotifyRemoteApi