Tag explicit content

Tag explicit content

Your service can tag explicit content for your listeners that use the Sonos app. Explicit content includes content that has excessive profanities, inappropriate references, or a Parental Advisory warning label. Tagged content will appear with  in the Sonos app. 

The following examples show what explicit content looks like in the Sonos app if your service takes advantage of this feature. Your service can tag explicit songs, albums, artists, radio stations, and other content for your listeners. Listeners see explicit tags in most places they see content in the Sonos app, such as:

  • browsing

  • searching

  • in the queue

  • in Sonos Favorites

  • in Sonos Playlists

  • the Now Playing screen

Listeners don't see explicit tags in these locations:

  • Info View
  • Album View
  • the Now Playing footer
  • the mini player for the Sonos app for PC
  • widget notifications for the Sonos app for Android

How to Tag your explicit content

To take advantage of explicit tagging, your service should include the <tags> type in <mediaMetadata> and <mediaCollection> objects. The <tags> type should contain the <explicit> element. Set <explicit> to "1" to tag explicit content. Set <explicit> to "0" for content that isn't explicit and doesn't need tagging. The <explicit> element defaults to “0” if you choose not to include it. If content doesn't need to be tagged, you don't need to return the <tags> type at all.  See getMetadata and getMediaMetadata for details about <mediaMetadata> and <mediaCollection> objects.

Explicit tagging is not supported for in-stream metadata on HLS tracks. You can tag containers, so we recommend tagging any HLS stream that may play explicit content. See HTTP Live Stream (HLS) for details about how Sonos players support HLS.

Please note, we make the following recommendations for tagging your explicit content:

  • Use explicit tags for playable containers if at least one item within the container is explicit. Listeners can play these containers in their entirety without browsing the contents.
        <mediaCollection>
          <id>playlist:2</id>
          <itemType>playlist</itemType>
          <displayType>recommended</displayType>
          <title>Explicit Playlist</title>
          <tags>
            <explicit>1</explicit>
          </tags>
          <canPlay>true</canPlay>
          <canEnumerate>true</canEnumerate>
          <canResume>false</canResume>
        </mediaCollection>
  • For audiobooks, use explicit tags at the book level and not for each individual chapter. Listeners can play audiobooks in their entirety without browsing the chapters.
        <mediaCollection>
          <id>bk:1</id>
          <itemType>audiobook</itemType>
          <displayType>booksEditorial</displayType>
          <title>The Adventures of Reading</title>
          <summary>A summary of the audiobook.</summary>
          <isFavorite>false</isFavorite>
          <tags>
            <explicit>1</explicit>
          </tags>
          <authorId>ar:34</authorId>
          <author>John Doe</author>
          <narratorId>ar:35</narratorId>
          <narrator>Jane D</narrator>
          <canPlay>true</canPlay>
          <canEnumerate>false</canEnumerate>
          <albumArtURI>https://example.com/assets/images/book1.jpg</albumArtURI>
          <canResume>true</canResume>
        </mediaCollection>
  • For programmed and streaming radio, use explicit tags for any stations that may play explicit content. This way, your listeners won’t be surprised if explicit content plays on the station they are playing.
        <mediaMetadata>
          <id>streamrad:1</id>
          <itemType>stream</itemType>
          <title>Explicit stream</title>
          <tags>
            <explicit>1</explicit>
          </tags>
          <mimeType>audio/m3u8</mimeType>
        </mediaMetadata>

Sample ResponseS

When your service sends a <mediaMetadata> object that should have an explicit tag, it should look something like this:

        <mediaMetadata>
          <id>track0001</id>
          <title>Kiss Kiss (single)</title>
          <mimeType>audio/x-ms-wma</mimeType>
          <itemType>track</itemType>
          <tags>
            <explicit>1</explicit>
          </tags>
          <trackMetadata>
            <albumId>album0001</albumId>
            <duration>253</duration>
            <artistId>artist0001</artistId>
            <artist>Chris Brown</artist>
            <album>Kiss Kiss [featuring T-Pain]</album>
            <albumArtURI>http://example.com/track0001.jpg</albumArtURI>
          </trackMetadata>
        </mediaMetadata>

When your service sends a <mediaCollection> object that should have an explicit tag, it should look something like this:

        <mediaCollection>
          <id>genre_mood:1</id>
          <itemType>container</itemType>
          <displayType>genreMood</displayType>
          <title>Entering Beast Mode</title>
          <summary>Summary of the media collection.</summary>
          <canPlay>false</canPlay>
          <ns:albumArtURI>https://acmemusic.example.com/assets/images/beast.jpg</ns:albumArtURI>
          <tags>
            <explicit>1</explicit>
          </tags>
        </mediaCollection>