...
Version | Publication Date | Author | Notes |
---|---|---|---|
1.0 | 2017-11-14 | JS | Initial Release |
1.1 | 2020-09-15 | JS | Added details about service account selection and the Top Menu |
1.2 | 2021-08-06 | JS | Additional details about |
1.3 | 2021-08-06 | JS | Add browsing sub-section to JSON API section |
1.4 | 2021-08-31 | JS | Add detail on browse command structure in JSON API section |
1.5 | 2021-09-04 | JS | Add |
1.6 | 2021-09-07 | JS | Add events that describe changes to Presets and Playlists |
1.7 | 2021-09-09 | JS | Add |
1.8 | 2022-10-04 | AC | Add Scene commands |
1.9 | 2022-12-13 | JS | Add argument details to |
2.0 | 2023-08-14 | JS | Fix typo in Album Art table |
2.1 | 2023-12-07 | JS | Add |
2.2 | 2024-01-19 | JS | Preliminary queue modification and |
Table of Contents | ||||
---|---|---|---|---|
|
Introduction
This document is intended to extend and eventually replace this document. Please refer to that PDF for an extensive accounting of all commands that existed at the time of its creation.
...
GetStatus
requests that all events related to the selected instance be sent now.
Events
The MMS communicates data back to its control clients through events. These events carry information about the current state of the server. They can also be used to request input from the user. Some events inform the control client about the availability of various functions while others tell the control client to take some action.
Events follow a simple format:
Code Block |
---|
EventReason Source Event=Value |
and will look like:
Code Block |
---|
StateChanged Player_A TrackTime=121 |
or
Code Block |
---|
ReportState Player_A TrackTime=121 |
Metadata Events
There are four lines of metadata and four metadata labels.
MetaData1
is generally reserved for radio station names or for track count data.
MetaData2
is generally reserved for the artist name.
MetaData3
is generally reserved for the album name.
MetaData4
is generally reserved for the track name.
MetaLabelx
events will always provide the label for the corresponding MetaDatax
field. MetaLabel1
follows MetaData1
, MetaLabel2
follows MetaData2
, etc. There are four MetaLabelx
events
An example of these events:
Code Block |
---|
ReportState Player_A MetaLabel1=
ReportState Player_A MetaData1=Pandora: Stevie Ray Vaughan Radio
ReportState Player_A MetaLabel2=Artist
ReportState Player_A MetaData2=Stevie Ray Vaughan
ReportState Player_A MetaLabel3=Album
ReportState Player_A MetaData3=Texas Flood (Legacy Edition)
ReportState Player_A MetaLabel4=Track
ReportState Player_A MetaData4=Texas Flood |
...
Setting Additional Options
In some cases, especially when writing a control client not known to MMS, it may be necessary to set some additional options that MMS presumes for known clients. Use the SetOption
command during the connection preamble. Here are list of those options:
Option | Purpose |
---|---|
supports_playnow=true | Indicates to MMS that the client supports the more advanced queue modification strategies described in the Modifying the Queue section below |
supports_inputbox=true | Indicates to MMS that the client supports Input and Message Box UI events |
supports_urls=true | Indicates to MMS that the client supports Page type Navigate events where MMS needs the client to open the indicated URL in a web browser |
Events
The MMS communicates data back to its control clients through events. These events carry information about the current state of the server. They can also be used to request input from the user. Some events inform the control client about the availability of various functions while others tell the control client to take some action.
Events follow a simple format:
Code Block |
---|
EventReason Source Event=Value |
and will look like:
Code Block |
---|
StateChanged Player_A TrackTime=121 |
or
Code Block |
---|
ReportState Player_A TrackTime=121 |
Metadata Events
There are four lines of metadata and four metadata labels.
MetaData1
is generally reserved for radio station names or for track count data.
MetaData2
is generally reserved for the artist name.
MetaData3
is generally reserved for the album name.
MetaData4
is generally reserved for the track name.
MetaLabelx
events will always provide the label for the corresponding MetaDatax
field. MetaLabel1
follows MetaData1
, MetaLabel2
follows MetaData2
, etc. There are four MetaLabelx
events
An example of these events:
Code Block |
---|
ReportState Player_A MetaLabel1=
ReportState Player_A MetaData1=Pandora: Stevie Ray Vaughan Radio
ReportState Player_A MetaLabel2=Artist
ReportState Player_A MetaData2=Stevie Ray Vaughan
ReportState Player_A MetaLabel3=Album
ReportState Player_A MetaData3=Texas Flood (Legacy Edition)
ReportState Player_A MetaLabel4=Track
ReportState Player_A MetaData4=Texas Flood |
Now Playing Art is handled by providing a few separate events.
...
Code Block |
---|
BrowseTopMenu itemGuid=fbbcedb1-af64-4c3f-bfe5-000000000010 <PickList total="85" start="1" more="true" art="true" alpha="false" displayAs="List" caption="Pandora Internet Radio"> <PickItem guid="85b427d1-c7d7-818c-b70c-bfa9670d647f" name="Account: pandora@example.com" dna="name" hasChildren="1" button="0" artGuid="fbbcedb1-af64-4c3f-bfe5-000000000010" /> <PickItem guid="ea03ab84-c1bc-3eb7-c6e8-5e2317c616cb" name="Create a Pandora station..." dna="name" hasChildren="1" button="0" singleInputBox="1" /> <PickItem guid="126e079c-3c5b-8dad-017a-9bc61ca8e7db" name="Browse Genre Stations" dna="name" hasChildren="1" button="0" /> <PickItem guid="37313631-3533-3634-3736-353538393632" name="Shuffle" dna="name" hasChildren="0" button="0" artGuid="d2bafcd0-5068-5b5c-21bd-97daf2342342" /> <PickItem guid="39383033-3534-3633-3830-373834393733" name="Gojira Radio" dna="name" hasChildren="0" button="6" artGuid="082f3d18-2b42-8434-e303-67975034e45f" action="action" /> <PickItem guid="32323034-3139-3230-3132-303631343034" name="Gunship Radio" dna="name" hasChildren="0" button="6" artGuid="e93114a7-30d9-ea99-98d8-e375c0fecff1" action="action" /> <PickItem guid="35363833-3235-3137-3335-353638373936" name="Mastodon Radio" dna="name" hasChildren="0" button="6" artGuid="3a729b47-6af2-88b0-7224-d05b87afb7db" action="action" /> <PickItem guid="37333534-3234-3232-3530-313637393031" name="ODESZA Radio" dna="name" hasChildren="0" button="6" artGuid="0f3611e8-d045-fd68-0c4f-4e167b1233fb" action="action" /> <PickItem guid="35373136-3731-3433-3132-373238343134" name="Dream Theater Radio" dna="name" hasChildren="0" button="6" artGuid="6156cf0c-999d-cdd7-d588-04539efeba4e" action="action" /> <PickItem guid="31353534-3037-3831-3935-343430363337" name="Clutch Radio" dna="name" hasChildren="0" button="6" artGuid="0618e948-1022-f4d0-6089-365468554b21" action="action" /> </PickList> |
Initiating playback with Content
The end result of browsing content on MMS is, of course, the initiation of content playback.
Directly Addressable Content
Any directly addressable content (local content, presets, playlists, scenes) can be recalled at any time without context or prior browse. Use the Play<Container> <containerGUID>
command to do so. For example, to play an Album
, use PlayAlbum <albumGUID>
. For a Playlist
, use PlayPlaylist <playlistGUID>
. The full list of directly addressable content is as follows:
Albums
Artists
Composers
Genres
Playlists
Presets
Scenes
Titles
Modifying the Queue
Initiating playback with an existing queue can be done in several ways that allow for queue construction or replacement. The available options and each option’s protocol verb are:
Play Next (
Next
)Insert the addressed content after the currently playing track
Play Now (
Now
)Insert the addressed content after the currently playing track and perform a skip
Replace Queue (
Replace
)Replace the entire queue with the addressed content
Add To Queue (
AddToQueue
)Append the addressed content to the end of the queue
Add To Playlist (
AddToPlaylist
)Append the addressed content to the end of a playlist as selected from the subsequently provided menu
While all of these options are always available, the options are condensed to those unique actions and presented to the connected client in a number of ways. In other words, when the queue is empty, the only presented option is Now because there is nothing to modify. Sending Replace
in such a scenario would perform the same exact action as Now
. The list of options is communicated to the connected client via the LocalQueueOptions
status event.
The intended option is communicated to the server by appending it to the end of the Play<Container>
command after the container’s GUID. For example, PlayAlbum c8507e3c-a5c0-4503-bd87-0b711580987e Replace
. For items where a listAction
is provided and that listAction
is ClarifyTitleIntent
, append the verb to the end of that command. For example, ClarifyTitleIntent 1609d2f0-b7c8-4996-9a48-4f434ad436e0 Next
. Leaving the verb off will result in a menu for the user to select from unless there is only one action available, in which case MMS will perform that action.
Presets
To store a Preset, use the StorePreset
command. This command takes an optional double-quoted name argument. If the name argument is specified, the MMS will store the Preset with that name. If no name is specified, the MMS will prompt for a name using an InputBox. InputBoxes are natively supported by all our control system drivers. As with all protocol commands, each command should be terminated with a carriage return and a line feed (\r\n).
...