IHMSPlaylistActions

Methods

pause

pause(): Promise<void>

Pauses current playing item

Returns

Promise<void>


play

play(id): Promise<void>

Pass the id of the item to be played

Parameters

NameTypeDescription
idstringid of playlist item

Returns

Promise<void>


playNext

playNext(): Promise<void>

PlayNext

Returns

Promise<void>


playPrevious

playPrevious(): Promise<void>

PlayPrevious

Returns

Promise<void>


seek

seek(seekValue): void

seek passing seekValue - this is relative to current position

Parameters

NameTypeDescription
seekValuenumbernumber in seconds to move forwards(pass negative values to move backwards)

Returns

void


seekTo

seekTo(seekValue): void

seek passing seekValue - seekValue will be absolute

Parameters

NameTypeDescription
seekValuenumbervalue in seconds of absolute position in the playlist item duration

Returns

void


setIsAutoplayOn

setIsAutoplayOn(autoplay): void

set whether to autoplay next item in playlist after the current one ends

Parameters

NameType
autoplayboolean

Returns

void


setList

setList<T>(list): void

pass list to set playlist

Type parameters

Name
T

Parameters

NameTypeDescription
listHMSPlaylistItem<T>[]of playlist items

Returns

void


setPlaybackRate

setPlaybackRate(playbackRate): void

Control the playback speed - 1.0 being normal, less than 1.0 will play it slowly and more than 1.0 will play it faster.

Parameters

NameTypeDescription
playbackRatenumbervalue from 0.25 and 2.0

Returns

void


setVolume

setVolume(volume): void

set volume passing volume

Parameters

NameTypeDescription
volumenumbernumber between 0-100

Returns

void


stop

stop(): Promise<void>

Stop the current playback and remove the tracks

Returns

Promise<void>