Dash.js: Persistent licenses in 2.6.8

Created on 2 May 2018  路  4Comments  路  Source: Dash-Industry-Forum/dash.js

Hello all,

Do I understand correctly that out of the box the player can now handle persistent licenses issued for Widevine DRM protected content and the way it works is you setup the player, you pass the persistent-license as a sessionType and you deliver a persistent license. Then, if you don't refresh the tab, don't closer the browser, but simply do attachSource to load another stream, you can be sure that a persistent license will be used when the stream it was issued for will be loaded again.

I tried doing so, but I still see the player requesting the license even though I don't refresh the page and simply do attachSource and pass the URL to the MPEG-DASH manifest I already acquire a persistent license for.

Please, let me know if my understanding is incorrect.

Thank you,
BR

Question

All 4 comments

Hello,

First, as you said, in order to obtain persistent license you need to setup the sessionType when requesting the license.

player.setProtectionData({
  'com.widevine.alpha': {
    ...
    sessionType: 'persistent-license'
  }
})

See for example "Unified Streaming (Widevine, persistent)" source configuration in dash-if-reference-player sample:
https://github.com/Dash-Industry-Forum/dash.js/blob/dd12ef2532ab827764c22314cf6c26b8fc156520/samples/dash-if-reference-player/app/sources.json#L892

Once you got the persistent license, you need to store the MediaKeySession ID.
Then if you want to reload the same stream and reuse the persistent license, you need to pass the MediaKeySession ID to the player (in protection data) so that it reloads the corresponding persistent MediaKeySession, then without requesting a new license.

player.setProtectionData({
  'com.widevine.alpha': {
    ...
    persistentSessionId: '<MediaKeySession ID>'
  }
})

Please have a look at dash-if-reference-player to see an example.
(since we had an issue during a merge, please check the dash-if-reference-player source code in PR #2451)

Ah, got it, so, it's not out of the box i.e. you can't just reference the dash.js and expect this to work. You need to do some work to make it happen.

Thank you very much for your response!

Works like a charm. Thank you @bbert !

After testing and look your sample, should be sessionId put in ProtectionData but not persistentSessionId

Was this page helpful?
0 / 5 - 0 ratings