Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistent licenses in 2.6.8 #2560

Closed
qchroman opened this issue May 2, 2018 · 4 comments
Closed

Persistent licenses in 2.6.8 #2560

qchroman opened this issue May 2, 2018 · 4 comments
Assignees
Labels

Comments

@qchroman
Copy link
Contributor

qchroman commented May 2, 2018

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

@bbert
Copy link
Contributor

bbert commented May 7, 2018

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:

"sessionType": "persistent-license"

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)

@qchroman
Copy link
Contributor Author

qchroman commented May 8, 2018

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!

@qchroman
Copy link
Contributor Author

qchroman commented May 8, 2018

Works like a charm. Thank you @bbert !

@qchroman qchroman closed this as completed May 8, 2018
@curt6815463
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants