Recover from Content Playback Failure
Provide a recovery queue that allows the client to resume playback after an error.
URL
POST https://cloudextension-testservice.local/api/queues/contentPlaybackFailureHeader Parameters
| Name | Type | Description |
|---|---|---|
Accept-Language Optional | string | The client’s current user interface language. If possible, respond with localized content for this language. |
User-Agent Required | string | The client’s extension protocol. This is an RFC 7231-compliant string that contains the product name |
x-applecloudextension-retry-count Optional | uint32 | The number of previous requests from the client. The client omits this header on the first attempt. |
x-applecloudextension-session-id Required | string | A session identifier to pair each request and response. Respond to requests with the value the client provides. |
Response Codes
| Status | Reason | Type | Description |
|---|---|---|---|
| 200 | OK Content-Type: application/json | Queue | The request is successful. |
| 204 | No Content | The service is unable to provide a recovery queue segment. | |
| 401 | Unauthorized | The request requires authorization. The client can attempt to reauthorize and then retry the request. | |
| 410 | Gone | The request includes an expired UserActivity, which the service is unable to use to provide a recovery queue segment. |
Discussion
If the playback of a queue fails to start, or there’s an error during playback that the client can recover from, the client reports the failure by sending a request to this endpoint. Configure your service to respond with a recovery queue that the client can use to restart playback.
Examples of recoverable playback failures include:
The client is unable to load the media using the provided URL.
The client is unable to acquire a content key for a protected asset.
The number of items in the queue segment exceeds the configured maximum.
HTTP Body
A JSON object that describes the playback failure, the state of the current queue, and the constraints to apply to the recovery queue.