Home Manual Reference Source Test
public class | source

SpotifyPlayback

Extends:

Playback → SpotifyPlayback

Method Summary

Public Methods
public

canGoNext(): *

public
public
public

isShuffle(): *

public

next()

public
public

setLoopStatus(status: *)

public

setShuffle(isShuffle: *)

public

setVolume(volume: *)

Inherited Summary

From class Playback
public

The current player being shown by the MPRIS2 interface

public

controls: Object<string, HTMLElement>

A dictionary of any controls extracted from the DOM

public

Check current page for 'next' functionality

public

Check current page for 'previous' functionality

public

Get the identity of playback, by default it is the site's domain

public

Get the loop status of playback

public

COMMAND Get active player's position

public

Get the rate of playback

public

One of PlaybackStatus.PLAYING or PlaybackStatus.PAUSED

public

Get the volume of playback

public

Get if the playback is shuffling between tracks

public

next()

Go to next media This should be implemented per provider

public

pause()

COMMAND Pause active player

public

play()

COMMAND Start to play active player

public

Go to previous This should be implemented per provider

public

seek(offset: number)

COMMAND Seek activePlayer to offset

public

Set the current active player

public

By default we don't support playlist looping (LoopStatus.PLAYLIST) so we force LoopStatus.TRACK loop if any loop other than LoopStatus.NONE is specified

public

setPosition(id: string, position: number)

COMMAND Set current position of active player

public

setRate(rate: number)

Set the rate of playback.

public

setShuffle(isShuffle: boolean)

Set the shuffle between tracks of playback

public

setVolume(volume: number)

Set the volume of playback

public

stop()

COMMAND Stop active player

public

COMMAND Toggle the fullscreen state

public

COMMAND Toggle between play and pause

Public Methods

public canGoNext(): * source

Check current page for 'next' functionality

Override:

Playback#canGoNext

Return:

*

public canGoPrevious(): * source

Check current page for 'previous' functionality

Override:

Playback#canGoPrevious

Return:

*

public getLoopStatus(): * source

Get the loop status of playback

Override:

Playback#getLoopStatus

Return:

*

public isShuffle(): * source

Get if the playback is shuffling between tracks

Override:

Playback#isShuffle

Return:

*

public next() source

Go to next media This should be implemented per provider

Override:

Playback#next

public previous() source

Go to previous This should be implemented per provider

Override:

Playback#previous

public setLoopStatus(status: *) source

By default we don't support playlist looping (LoopStatus.PLAYLIST) so we force LoopStatus.TRACK loop if any loop other than LoopStatus.NONE is specified

Override:

Playback#setLoopStatus

Params:

NameTypeAttributeDescription
status *

public setShuffle(isShuffle: *) source

Set the shuffle between tracks of playback

Override:

Playback#setShuffle

Params:

NameTypeAttributeDescription
isShuffle *

public setVolume(volume: *) source

Set the volume of playback

Override:

Playback#setVolume

Params:

NameTypeAttributeDescription
volume *