Module: state_js

Methods

(inner) clearBackgroundImage(el) → {void}

Clears the background image
Parameters:
Name Type Description
el HTMLElement element for the background image
Source:
Returns:
Type
void

(inner) clearCurrentCover() → {void}

Clears the current cover in playback view and footer
Source:
Returns:
Type
void

(inner) clearJukeboxError() → {void}

Clears the jukebox error
Source:
Returns:
Type
void

(inner) clearMPDerror() → {void}

Clears the mpd error
Source:
Returns:
Type
void

(inner) getCounterText() → {string}

Creates the elapsed / duration counter text
Source:
Returns:
song counter text
Type
string

(inner) getState() → {void}

Gets the player state
Source:
Returns:
Type
void

(inner) mediaSessionSetMetadata(title, artist, album, url) → {void}

Sets metadata for the media session api
Parameters:
Name Type Description
title string song title
artist object array of artists
album string album name
url string song uri
Source:
Returns:
Type
void

(inner) mediaSessionSetPositionState(duration, position) → {void}

Sets the elapsed time for the media session api
Parameters:
Name Type Description
duration number song duration
position number elapsed time
Source:
Returns:
Type
void

(inner) mediaSessionSetState() → {void}

Sets the state for the media session api
Source:
Returns:
Type
void

(inner) parseState(obj) → {void}

Parses the MYMPD_API_PLAYER_STATE jsonrpc response
Parameters:
Name Type Description
obj object jsonrpc response
Source:
Returns:
Type
void

(inner) setBackgroundImage(el, url) → {void}

Sets the background image
Parameters:
Name Type Description
el HTMLElement element for the background image
url string background image url
Source:
Returns:
Type
void

(inner) setCounter() → {void}

Sets the song counters
Source:
Returns:
Type
void

(inner) setCurrentCover(url) → {void}

Sets the current cover in playback view and footer
Parameters:
Name Type Description
url string song uri
Source:
Returns:
Type
void

(inner) updatePlaybackControls() → {void}

Sets the state of the playback control buttons
Source:
Returns:
Type
void