Methods
(inner) clearBackgroundImage(el) → {void}
Clears the background image
Parameters:
Name | Type | Description |
---|---|---|
el |
HTMLElement | element for the background image |
Returns:
- Type
- void
(inner) clearCurrentCover() → {void}
Clears the current cover in playback view and footer
Returns:
- Type
- void
(inner) clearJukeboxError() → {void}
Clears the jukebox error
Returns:
- Type
- void
(inner) clearMPDerror() → {void}
Clears the mpd error
Returns:
- Type
- void
(inner) getCounterText() → {string}
Creates the elapsed / duration counter text
Returns:
song counter text
- Type
- string
(inner) getState() → {void}
Gets the player state
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 |
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 |
Returns:
- Type
- void
(inner) mediaSessionSetState() → {void}
Sets the state for the media session api
Returns:
- Type
- void
(inner) parseState(obj) → {void}
Parses the MYMPD_API_PLAYER_STATE jsonrpc response
Parameters:
Name | Type | Description |
---|---|---|
obj |
object | jsonrpc response |
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 |
Returns:
- Type
- void
(inner) setCounter() → {void}
Sets the song counters
Returns:
- Type
- void
(inner) setCurrentCover(url) → {void}
Sets the current cover in playback view and footer
Parameters:
Name | Type | Description |
---|---|---|
url |
string | song uri |
Returns:
- Type
- void
(inner) updatePlaybackControls() → {void}
Sets the state of the playback control buttons
Returns:
- Type
- void