Skip to main content
Skip table of contents

Key rotation

Key rotation for live streams is where a live stream encryption key changes periodically, and a new key needs to be fetched. No additional APIs are required for this feature, although there may be a slight pause in playback when key rotation occurs.

Depending on the licence server used, the default OTVHttpMediaDrmCallback class may not be able to handle key rotation requests if, for example, a new token is required for each key request. In that case, a bespoke class implementing OTVMediaDrmCallback may be needed instead. See the supplied example code (customised-encrypted-playback) for an example with a dedicated OTVCustomisedMediaDrmCallback class.

Key rotation and temporal licence pre-delivery

To reduce key request calls to the licence server when playing a stream with key rotation, the licence server may send back the key for the next session and keys for the sessions following. SDK 5 caches these additional keys, and when a new key is required, the player checks if the key is already cached before submitting a request to the licence server. There is no additional API for this feature.

Storing pre-delivered keys is not supported for API levels below 23 (Marshmallow).

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.