features/remoteControls
RemoteJumpBackwardEvent
Remote jump backward event.
Properties
| Property | Type | Description |
|---|---|---|
interval | number | Jump interval in seconds |
RemoteJumpForwardEvent
Remote jump forward event.
Properties
| Property | Type | Description |
|---|---|---|
interval | number | Jump interval in seconds |
RemotePlayIdEvent
Remote play ID event (Android only).
Properties
| Property | Type | Description |
|---|---|---|
id | string | The ID of the track to play |
index? | number | Optional index in the queue |
RemotePlaySearchEvent
Remote play search event (Android only).
Properties
| Property | Type | Description |
|---|---|---|
query | string | The search query |
handleRemoteJumpBackward()
function handleRemoteJumpBackward(callback): void;Sets a custom handler for remote jump backward events, overriding the default behavior.
Parameters
| Parameter | Type | Description |
|---|---|---|
callback | (event) => void | undefined | Called when the user presses the jump backward button. Pass undefined to disable. |
Returns
void
onRemoteJumpBackward()
const onRemoteJumpBackward: (callback) => () => void;Subscribes to remote jump backward events.
Parameters
| Parameter | Type | Description |
|---|---|---|
callback | Callback<RemoteJumpBackwardEvent> | Called when the user presses the jump backward button |
Returns
Cleanup function to unsubscribe
(): void;Returns
void
handleRemoteJumpForward()
function handleRemoteJumpForward(callback): void;Sets a custom handler for remote jump forward events, overriding the default behavior.
Parameters
| Parameter | Type | Description |
|---|---|---|
callback | (event) => void | undefined | Called when the user presses the jump forward button. Pass undefined to disable. |
Returns
void
onRemoteJumpForward()
const onRemoteJumpForward: (callback) => () => void;Subscribes to remote jump forward events.
Parameters
| Parameter | Type | Description |
|---|---|---|
callback | Callback<RemoteJumpForwardEvent> | Called when the user presses the jump forward button |
Returns
Cleanup function to unsubscribe
(): void;Returns
void
handleRemoteNext()
function handleRemoteNext(callback): void;Sets a custom handler for remote next events, overriding the default behavior.
Parameters
| Parameter | Type | Description |
|---|---|---|
callback | () => void | undefined | Called when the user presses the next track button. Pass undefined to disable. |
Returns
void
onRemoteNext()
const onRemoteNext: (callback) => () => void;Subscribes to remote next events.
Parameters
| Parameter | Type | Description |
|---|---|---|
callback | Callback<void> | Called when the user presses the next track button |
Returns
Cleanup function to unsubscribe
(): void;Returns
void
handleRemotePause()
function handleRemotePause(callback): void;Sets a custom handler for remote pause events, overriding the default behavior.
Parameters
| Parameter | Type | Description |
|---|---|---|
callback | () => void | undefined | Called when the user presses the pause button. Pass undefined to disable. |
Returns
void
onRemotePause()
const onRemotePause: (callback) => () => void;Subscribes to remote pause events.
Parameters
| Parameter | Type | Description |
|---|---|---|
callback | Callback<void> | Called when the user presses the pause button |
Returns
Cleanup function to unsubscribe
(): void;Returns
void
handleRemotePlay()
function handleRemotePlay(callback): void;Sets a custom handler for remote play events, overriding the default behavior.
Parameters
| Parameter | Type | Description |
|---|---|---|
callback | () => void | undefined | Called when the user presses the play button. Pass undefined to disable. |
Returns
void
onRemotePlay()
const onRemotePlay: (callback) => () => void;Subscribes to remote play events.
Parameters
| Parameter | Type | Description |
|---|---|---|
callback | Callback<void> | Called when the user presses the play button |
Returns
Cleanup function to unsubscribe
(): void;Returns
void
onRemotePlayId()
const onRemotePlayId: (callback) => () => void;Subscribes to remote play ID events (Android only).
Parameters
| Parameter | Type | Description |
|---|---|---|
callback | Callback<RemotePlayIdEvent> | Called when the user selects a track from an external device |
Returns
Cleanup function to unsubscribe
(): void;Returns
void
onRemotePlaySearch()
const onRemotePlaySearch: (callback) => () => void;Subscribes to remote play search events (Android only).
Parameters
| Parameter | Type | Description |
|---|---|---|
callback | Callback<RemotePlaySearchEvent> | Called when the user searches for a track (usually voice search) |
Returns
Cleanup function to unsubscribe
(): void;Returns
void
handleRemotePrevious()
function handleRemotePrevious(callback): void;Sets a custom handler for remote previous events, overriding the default behavior.
Parameters
| Parameter | Type | Description |
|---|---|---|
callback | () => void | undefined | Called when the user presses the previous track button. Pass undefined to disable. |
Returns
void
onRemotePrevious()
const onRemotePrevious: (callback) => () => void;Subscribes to remote previous events.
Parameters
| Parameter | Type | Description |
|---|---|---|
callback | Callback<void> | Called when the user presses the previous track button |
Returns
Cleanup function to unsubscribe
(): void;Returns
void
handleRemoteSeek()
function handleRemoteSeek(callback): void;Sets a custom handler for remote seek events, overriding the default behavior.
Parameters
| Parameter | Type | Description |
|---|---|---|
callback | (event) => void | undefined | Called when the user changes the position of the timeline. Pass undefined to disable. |
Returns
void
onRemoteSeek()
const onRemoteSeek: (callback) => () => void;Subscribes to remote seek events.
Parameters
| Parameter | Type | Description |
|---|---|---|
callback | Callback<RemoteSeekEvent> | Called when the user changes the position of the timeline |
Returns
Cleanup function to unsubscribe
(): void;Returns
void
onRemoteSetRating()
const onRemoteSetRating: (callback) => () => void;Subscribes to remote set rating events.
Parameters
| Parameter | Type | Description |
|---|---|---|
callback | Callback<RemoteSetRatingEvent> | Called when the user changes the rating for the track remotely |
Returns
Cleanup function to unsubscribe
(): void;Returns
void
onRemoteSkip()
const onRemoteSkip: (callback) => () => void;Subscribes to remote skip events (Android only).
Parameters
| Parameter | Type | Description |
|---|---|---|
callback | Callback<RemoteSkipEvent> | Called when the user presses the skip button |
Returns
Cleanup function to unsubscribe
(): void;Returns
void
handleRemoteStop()
function handleRemoteStop(callback): void;Sets a custom handler for remote stop events, overriding the default behavior.
Parameters
| Parameter | Type | Description |
|---|---|---|
callback | () => void | undefined | Called when the user presses the stop button. Pass undefined to disable. |
Returns
void
onRemoteStop()
const onRemoteStop: (callback) => () => void;Subscribes to remote stop events.
Parameters
| Parameter | Type | Description |
|---|---|---|
callback | Callback<void> | Called when the user presses the stop button |
Returns
Cleanup function to unsubscribe
(): void;Returns
void
RemoteSeekEvent
Remote seek event.
Properties
| Property | Type | Description |
|---|---|---|
position | number | The position to seek to in seconds |
RemoteSetRatingEvent
Remote set rating event.
Properties
| Property | Type |
|---|---|
rating | | HeartRating | ThumbsRating | StarRating | PercentageRating |
RemoteSkipEvent
Remote skip event (Android only).
Properties
| Property | Type | Description |
|---|---|---|
index | number | The index to skip to |