Offline Licensing

Reference for enabling offline licenses for DRM-protected videos.

Gumlet allows persistent licensing for DRM-protected videos which enables users to download video content along with its DRM license for offline viewing. License persistence can be used with Widevine and Fairplay DRM.

Gumlet provides the following parameters to control license persistence on the user's device.

Rental Duration: Specified in seconds, this parameter controls how long the user's device can persist the license. At the end of the specified duration, the license would be automatically revoked and the user won't be able to play the DRM-protected content. For example, if you want to persist a license on a device for a month you need to set this parameter with the value 2592000 (3600_24_30).

Once use of the license has started, the rental_duration is not used or enforced.

Playback Duration: Indicates the amount of time the license is valid after first (initial) use.

You can use these parameters with the license URL for Widevine and Fairplay DRM systems as the query parameters. Consider the following examples.

https://widevine.gumlet.com/licence/5f2bdde3e93619b8859d8831/abcde123456?rental_duration=2592000&playback_duration=7200
https://fairplay.gumlet.com/licence/5f2bdde3e93619b8859d8831?storage_duration=2592000&playback_duration=7200

If you are using these parameters, they should also be part of string that you sign for token generation:

let stringForTokenGeneration = `${proxyUrl.slice(35)}?expires=${expiration}&rental_duration=${rental_duration}&playback_duration=${playback_duration}`;