Related browse

The related browse action allows listeners to browse your service for music related to the current item. The following shows an example in the Info View of a related browse action.

The following steps describe how to implement the related browse action:

  1. Define the text string in your i18next file that is to display in the Info View of the Sonos app. ("Related Songs").

            "RELATED_SONGS": "Related Songs"
  2. When the listener selects the ellipsis (...) to see the Info View, Sonos sends your service a getExtendedMetadata request. This example is for a track itemType.

       <getExtendedMetadata xmlns="">  
  3. Include all the custom action items for the Info View in your getExtendedMetadata response. To simplify this example we'll show a related browse custom action.

    <s:Envelope xmlns:s="<>" xmlns:ns="<>">   
                   <ns:title>This is the title</ns:title>  
                      <ns:artist>Example Artist</ns:artist>  
                . . . Details for other custom actions in the Info View are not shown . . .  
  4. Note the following about relatedBrowse:

    idThe value related-t:123456 identifies the service’s tracks related to the current track, t:123456. The pattern of these IDs is up to you.
    typeThe value RELATED_SONGS corresponds to the JSON key in the i18next file above.
  5. When a listener chooses a relatedBrowse action, the Sonos app sends a getMetadata request to your service using the given related browse id (related-t:123456).

  6. Your service should respond to getMetadata with a mediaCollection of related songs.