PM123 currently understands the following commands for controlling the playback engine. Optional parameters are enclosed in square brackets.
Command | Description | Reply |
---|---|---|
load <url> [<url> [...]] | Loads one or more file
or url
into the player. Any currently playing item will be aborted. Starts playing it too, if 'auto play on load'
is set. Specifying more than one file is equivalent to dropping multiple items on the player. This implicitly modifies the default playlist. The file names may be enclosed in double quotes ("). |
Result code, non-zero = error. |
play [<url> [<url> [...]]] | Starts playing. If at least one file or url was specified, it will be first loaded and playback will be started. See load for details. Any currently playing item will be aborted. |
Result code, non-zero = error. |
stop | Stops playback. | Result code, non-zero = error. |
stopat
song <url>
[time <time>[%]] |
Stops playback
when reaching the specified location.
See navigate
for the syntax. stopat without an argument removes the explicit stop location. |
Result code, non-zero = error. |
stopat path [;]<item>[;<sub item>[;...]] [time <time>[%]] | ||
pause [on|off](1) | Pauses or resumes the playback. | Result code, non-zero = error. |
rewind [on|off](1) | Toggles or (re)sets rewind of the currently playing file. If rewind is activated fast forward is implicitly deactivated. | Result code, non-zero = error. |
forward [on|off](1) | Toggles or (re)sets fast forward of the currently playing file. If fast forward is activated rewind is implicitly deactivated. | Result code, non-zero = error. |
next [<count>] | Selects the next song in playlist. If <count> is specified, you can skip more than one song at once. | Result code, non-zero = error. |
prev
[<count>] previous [<count>] | Selects the previous song in playlist. If <count> is specified, you can skip more than one song at once. | Result code, non-zero = error. |
navigate
song <url> [time <time>[%]] |
Navigate within
the currently loaded playlist. Examples: 'navigate path ;D:\songs\song1.mp3' navigates to the start of the song within the currently loaded playlist. If the file is referenced twice, the first instance s taken. navigate uses the location string syntax. 'navigate song D:\songs\song1.mp3 time 1:02.7' navigates to location 62.7 seconds within the next occurrence of . |
Result code, non-zero = error. |
navigate path [;]<item>[;<sub item>[;...]] [time <time>[%]] | ||
jump <n> | Jump to <n>
seconds in the currently playing file. <n>
may be a fractional number. Note that jump is not reliable in playlist mode, because the currently playing song may change just before jump is executed. You should prefer navigate in this case. This will restore the previous song in doubt. |
Result code, non-zero = error. |
savestream [<file>] | Save stream to the specified file (if the decoder supports that). savestream without a file argument stops saving a stream. | Result code, non-zero = error. |
volume [[+|-]<n>] | Sets volume to <n>% (scale 0-100, of course). If a sign is included, <n> is added to the current volume level. If <n> is omitted the volume is unchanged. | Previous volume setting or empty string on error. |
shuffle [on|off](1) | Toggles or (re)sets shuffling. | Result code, non-zero = error. |
repeat [on|off](1) | Toggles or (re)sets repeat. | Result code, non-zero = error. |
query play | pause | rewind | forward | repeat | shuffle | Return whether the player is playing, paused, in rewind mode, in fast forward mode or whether repeat or shuffle is activated. | 0 = off, 1 = on, blank = error, invalid request |
current [song|root] | Query the current song or the currently loaded
playlist. If only one song is currently loaded into the player current root
will also return the song. By default current returns the current song. |
Current objects URL or empty if none. |
status tag|file|info | Returns the information currently displayed in the scroller or returns nothing if "no file loaded". | Info string. |
location [play|stopat] | Query the current playing location (default). location stopat return the current stop location if any. |
Location as PM123 location string or empty if none. |