Mount Status Codes

Prev Next

Mount status codes are used to inform the player if the stream is available, and if not, why not. Each mount point can have its own status code and message. In the current API, only a single mount can be returned, but future versions will support multiple mount queries and clients should handle the status code and message appropriately. Also, when the status code is anything other than 2xx, the only field guaranteed to be valid is the mount name (e.g. the <mount> tag).  Other fields will be present, but their values could be invalid.

Since Player Provisioning API version 1.1, the HTTP code returned is always 200. This allows the player to receive the XML file with the mount status code and get more information about what went wrong. In the case of a server error or a malformed request etc., the standard HTTP codes apply.

Mount status codes

CodeMessageDescription

200

OK

Request is successful

501

Not implemented        

Requested version doesn’t exist

400

Bad Request

A required parameter is missing or an invalid parameter was sent

404

Not Found

Mount doesn’t exist

453

Forbidden (Content Access Denied)        

Access to this mount is denied (e.g., client IP is geoblocked)

Example XML response for a non-200 status code:

<?xml version="1.0" encoding="UTF-8"?standalone="yes"?>
<live_stream_config version="1.9" xmlns="http://provisioning.streamtheworld.com/player/livestream-1.9">
<mountpoints>
  <mountpoint>
    <status>
      <status-code>453</status-code>
      <status-message>Forbidden (Content Access Denied)</status-message>
    </status>
 
    <mount>WXYZFM</mount> 
 
    <!-- Optional Section --> 
    <alternate-content> 
      <url>[URL to alternate content]</url> 
      <!-- OR --> 
      <mount>[Alternate Mount Name]</mount> 
    </alternate-content> 
  </mountpoint> 
</mountpoints> 
</live_stream_config>

Alternate Content

When a stream is geo-blocked (i.e., returns a 453 status code), it is possible that some alternate content is offered to the listener that has been blocked. As shown above, this will be sent in the response in an <alternate-content> element, itself containing one of the elements shown in the table below.

Alternate Content Elements

TagDescription

<url>

URL pointing to an audio file (usually) that should be played back to the listener.

<mount>

Mount name to which the listener should be redirected.  This is handled by the player by re-issuing a new provisioning call to the alternate mount before attempting connection.