/
Playback information

Playback information

Clients can store playback information for watched assets. This information can be retrieved later for multiple purposes.

The following playback information can be stored:

  • Playback postition: The playback position is the point (given in seconds) at which the asset is currently being played.
  • Last watched at: A Unix timestamp specifying when the asset was last watched.

Playback information is stored and retrieved through the Playback Info API.

Endpoints overview:

EndpointHTTP methodPurpose
/user_profiles/{user_profile_id}/assets/{asset_type}/{asset_id}PUTStore playback information for a given asset
/user_profiles/{user_profile_id}/assets/{asset_type}/{asset_id}GETFetch playback information for a given asset
/user_profiles/{user_profile_id}/assets/{asset_type}GETFetch playback information for multiple assets

Playback information can be stored for any Recording, Catchup or VOD asset. The "asset_type" is the type of the watched asset, values "recording", "catchup" and "vod" are supported.

Playback information is always tied to a user profile, and the client must authenticate as that user to access the playback information.

The asset ID can be any ID unique to that asset for that type. The same ID must be used when storing and retrieving the assets. The API will not validate any ID provided, the client is responsible for making sure that the assets are retrievable by the same parameters as they were stored with. For recordings and catchup, it is recommended to use the broadcast slot ID or EPG ID. If any other ID is used, it might not be possible to aggregate view counts, which may be necessary for some "most popular" APIs.

If an asset is stored with an ID that already has information stored for the same user profile and the same asset type, then the playback information for that asset will be replaced.

Grouping

Assets can be grouped by any client provided group ID. For example, recording assets can be grouped by series, by providing the series ID as group_id when storing playback information for the asset. This makes it convenient to retrieve all available playback information for some given group. The endpoint to fetch playback information for multiple assets supports filtering. See the JSON API spec for instructions on how to pass filtering parameters. At the moment, only filtering by group ID is supported.

Note:

If filter[group_id] is not provided in the query, then the endpoint returns ungrouped assets and vice versa.

Related content