"What's next" on catchup - Near Live TV
Introduction
This feature allows users to watch catchup television continuously.
This is a "near live" feature that allows user to start watching a catchup item and when it finishes progress to the next item that was broadcast.
Request
In order to get next playable catchup stream URL, client should provide autoplay=catchup
as an URL query parameter ref: PlayableStream related to Recording#/Stream/getChannelStreams
Example request:
curl -X GET "https://api.customer.domain/api/recordings/v1/recordings/123/relationships/streams?autoplay=catchup"
Definitions
Property | Location | Definition |
---|---|---|
autoplay | Request | Indication of request to get the next playable stream URL. Supported autoplay context(s) : catchup |
suggested_start_time | Request | Value is set by Amino API when generating "play next" URL, client app should never use it |
suggested_start_time | Response | The time used to suggest client when the stream will start |
API response
The API will include a HATEOAS link with requests for catchup streams that indicates the next item in the series.
The client should look for the presence of a "play_next_catchup" HATEOAS item in the "links" key. The presence if this property, or whole "links" object is not guaranteed, do not rely on it.
This response will look something like this:
Workflow
- Client calls recording streams for catchup with ?autoplay=catchup parameter (in case user will skip ahead immediately)
- Client plays the (catchup) recording for a while
- When it's close to an end, client should make exactly the same call with ?autoplay=catchup parameter, to potentially get updated "play_next_catchup" value.
- Response might contain play_next_catchup in links
- After finishing current playback, client shall call the provided URL as is and get new streams. Response might contain "play next" link as well.
- Client must use
suggested
_start_time value from provided stream response and start playback from there - GOTO 2
Blacklisted items
The API will return items in the sequence that they were broadcast. This means that if you follow the "play_next_catchup" item in the catchup response you should view the program that was broadcast live immediately after it.
Some programs are blacklisted from the catchup service.
The API will skip these programs and will give you the next valid program for catchup in the "play_next_catchup" key.
This means that the "play_next_catchup" key will consistently be the next item that is available for catchup.
Last catchup program?
If there are no catchup programs available, "play_next_catchup" value will point to live channel streams API, including "restart_at_beginning=true
". It means that user will be watching live TV from now on.
In that case response will be :
Values in "play_next_catchup"
In call cases when "play_next_catchup" is present in the response, it contains a fully-formed stream API URL. Client code must not parse or modify this URL. URL format can change at any time to incorporate new features. While these links can point to different API endpoints (e.g. live streams, recording streams), the response is always in the same format, client code doesn't need to understand which API endpoint is actually used.