Search code examples
cobalt

Key expiration while playing purchased video


I had ported Widevine CDM to cobalt RELEASE_9 branch. Playback of purchased video very well in beginning of 5 minutes. After 5 minutes, decrypt failed, the reason is key expiration.

After review DRM related API in starboard, I have two questions:

1.How to handle "renewal" message from CDM? how to inform upper layer when such message existed?

2.If key/license expired, how to reflect such status to upper layer?

Thanks


Solution

  • You can call SbDrmSessionUpdateRequestFunc with kSbDrmTicketInvalid if the update request was generated by the DRM system (Widevine CDM in this case). Cobalt will pass these messages to server to get new license.

    Check the comment in Drm.h and you also need SB_API_VERSION >= 4 in your platform.