Skip to content

features/remoteControls

RemoteJumpBackwardEvent

Remote jump backward event.

Properties

PropertyTypeDescription
intervalnumberJump interval in seconds

RemoteJumpForwardEvent

Remote jump forward event.

Properties

PropertyTypeDescription
intervalnumberJump interval in seconds

RemotePlayIdEvent

Remote play ID event (Android only).

Properties

PropertyTypeDescription
idstringThe ID of the track to play
index?numberOptional index in the queue

RemotePlaySearchEvent

Remote play search event (Android only).

Properties

PropertyTypeDescription
querystringThe search query

handleRemoteJumpBackward()

ts
function handleRemoteJumpBackward(callback): void;

Sets a custom handler for remote jump backward events, overriding the default behavior.

Parameters

ParameterTypeDescription
callback(event) => void | undefinedCalled when the user presses the jump backward button. Pass undefined to disable.

Returns

void


onRemoteJumpBackward()

ts
const onRemoteJumpBackward: (callback) => () => void;

Subscribes to remote jump backward events.

Parameters

ParameterTypeDescription
callbackCallback<RemoteJumpBackwardEvent>Called when the user presses the jump backward button

Returns

Cleanup function to unsubscribe

ts
(): void;

Returns

void


handleRemoteJumpForward()

ts
function handleRemoteJumpForward(callback): void;

Sets a custom handler for remote jump forward events, overriding the default behavior.

Parameters

ParameterTypeDescription
callback(event) => void | undefinedCalled when the user presses the jump forward button. Pass undefined to disable.

Returns

void


onRemoteJumpForward()

ts
const onRemoteJumpForward: (callback) => () => void;

Subscribes to remote jump forward events.

Parameters

ParameterTypeDescription
callbackCallback<RemoteJumpForwardEvent>Called when the user presses the jump forward button

Returns

Cleanup function to unsubscribe

ts
(): void;

Returns

void


handleRemoteNext()

ts
function handleRemoteNext(callback): void;

Sets a custom handler for remote next events, overriding the default behavior.

Parameters

ParameterTypeDescription
callback() => void | undefinedCalled when the user presses the next track button. Pass undefined to disable.

Returns

void


onRemoteNext()

ts
const onRemoteNext: (callback) => () => void;

Subscribes to remote next events.

Parameters

ParameterTypeDescription
callbackCallback<void>Called when the user presses the next track button

Returns

Cleanup function to unsubscribe

ts
(): void;

Returns

void


handleRemotePause()

ts
function handleRemotePause(callback): void;

Sets a custom handler for remote pause events, overriding the default behavior.

Parameters

ParameterTypeDescription
callback() => void | undefinedCalled when the user presses the pause button. Pass undefined to disable.

Returns

void


onRemotePause()

ts
const onRemotePause: (callback) => () => void;

Subscribes to remote pause events.

Parameters

ParameterTypeDescription
callbackCallback<void>Called when the user presses the pause button

Returns

Cleanup function to unsubscribe

ts
(): void;

Returns

void


handleRemotePlay()

ts
function handleRemotePlay(callback): void;

Sets a custom handler for remote play events, overriding the default behavior.

Parameters

ParameterTypeDescription
callback() => void | undefinedCalled when the user presses the play button. Pass undefined to disable.

Returns

void


onRemotePlay()

ts
const onRemotePlay: (callback) => () => void;

Subscribes to remote play events.

Parameters

ParameterTypeDescription
callbackCallback<void>Called when the user presses the play button

Returns

Cleanup function to unsubscribe

ts
(): void;

Returns

void


onRemotePlayId()

ts
const onRemotePlayId: (callback) => () => void;

Subscribes to remote play ID events (Android only).

Parameters

ParameterTypeDescription
callbackCallback<RemotePlayIdEvent>Called when the user selects a track from an external device

Returns

Cleanup function to unsubscribe

ts
(): void;

Returns

void


onRemotePlaySearch()

ts
const onRemotePlaySearch: (callback) => () => void;

Subscribes to remote play search events (Android only).

Parameters

ParameterTypeDescription
callbackCallback<RemotePlaySearchEvent>Called when the user searches for a track (usually voice search)

Returns

Cleanup function to unsubscribe

ts
(): void;

Returns

void


handleRemotePrevious()

ts
function handleRemotePrevious(callback): void;

Sets a custom handler for remote previous events, overriding the default behavior.

Parameters

ParameterTypeDescription
callback() => void | undefinedCalled when the user presses the previous track button. Pass undefined to disable.

Returns

void


onRemotePrevious()

ts
const onRemotePrevious: (callback) => () => void;

Subscribes to remote previous events.

Parameters

ParameterTypeDescription
callbackCallback<void>Called when the user presses the previous track button

Returns

Cleanup function to unsubscribe

ts
(): void;

Returns

void


handleRemoteSeek()

ts
function handleRemoteSeek(callback): void;

Sets a custom handler for remote seek events, overriding the default behavior.

Parameters

ParameterTypeDescription
callback(event) => void | undefinedCalled when the user changes the position of the timeline. Pass undefined to disable.

Returns

void


onRemoteSeek()

ts
const onRemoteSeek: (callback) => () => void;

Subscribes to remote seek events.

Parameters

ParameterTypeDescription
callbackCallback<RemoteSeekEvent>Called when the user changes the position of the timeline

Returns

Cleanup function to unsubscribe

ts
(): void;

Returns

void


onRemoteSetRating()

ts
const onRemoteSetRating: (callback) => () => void;

Subscribes to remote set rating events.

Parameters

ParameterTypeDescription
callbackCallback<RemoteSetRatingEvent>Called when the user changes the rating for the track remotely

Returns

Cleanup function to unsubscribe

ts
(): void;

Returns

void


onRemoteSkip()

ts
const onRemoteSkip: (callback) => () => void;

Subscribes to remote skip events (Android only).

Parameters

ParameterTypeDescription
callbackCallback<RemoteSkipEvent>Called when the user presses the skip button

Returns

Cleanup function to unsubscribe

ts
(): void;

Returns

void


handleRemoteStop()

ts
function handleRemoteStop(callback): void;

Sets a custom handler for remote stop events, overriding the default behavior.

Parameters

ParameterTypeDescription
callback() => void | undefinedCalled when the user presses the stop button. Pass undefined to disable.

Returns

void


onRemoteStop()

ts
const onRemoteStop: (callback) => () => void;

Subscribes to remote stop events.

Parameters

ParameterTypeDescription
callbackCallback<void>Called when the user presses the stop button

Returns

Cleanup function to unsubscribe

ts
(): void;

Returns

void


RemoteSeekEvent

Remote seek event.

Properties

PropertyTypeDescription
positionnumberThe position to seek to in seconds

RemoteSetRatingEvent

Remote set rating event.

Properties

PropertyType
rating| HeartRating | ThumbsRating | StarRating | PercentageRating

RemoteSkipEvent

Remote skip event (Android only).

Properties

PropertyTypeDescription
indexnumberThe index to skip to