Skip to content

Web API Docs

Alexandru Branza edited this page Jan 13, 2020 · 4 revisions

You can optionally start Powder Player with --web-api (a port can also be included --web-api=8213) to enable a Web API that allows remote actions.

All routes support only GET requests.

/pause - Pauses the current media

/play - Plays the current media

/togglePause - Pause / play the current media

/next - Start next item in playlist

/prev - Start previous item in playlist

/item_data - Get metadata for currently playing item (in JSON)

/playlist - Get an array of metadata for all items in playlist (in JSON)

/progress - Get current playback progress (from 0.0 to 1.0)

/set_progress - Supports passing a query string to it, if value= is set is set to a Float (between 0.0 and 1.0), it will seek to that position

/time - Get current playback time, in milliseconds

/set_time - Supports passing a query string to it, if value= is set is set to a Integer (between 0 total duration, in milliseconds), it will seek to that time

/duration - Get total length (in milliseconds) of the currently playing item, if this value is -1, then nothing is playing

/volume - Get current player volume (between 0 and 200)

/set_volume - Supports passing a query string to it, if value= is set is set to an Integer (between 0 and 200), it will set the volume to that value

/muted - Get current player mute state (either true or false)

/set_mute - Supports passing a query string to it, if value= is set is set to a Boolean (either true or false), it will set the mute state to that value

/toggle_mute - Toggles the player mute state

/state - Get current playback state (can be: NothingSpecial, Opening, Buffering, Playing, Paused, Stopped, Ended, Error)

/add_playlist - Supports passing a query string to it, if url= is set, it will add that URL to the playlist, if file= is set, it will add that file to the playlist

You can’t perform that action at this time.