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

Getting drm info from player #272

Closed
pajong opened this issue Jan 20, 2016 · 9 comments
Closed

Getting drm info from player #272

pajong opened this issue Jan 20, 2016 · 9 comments
Labels
status: archived Archived and locked; will not be updated type: enhancement New feature or request
Milestone

Comments

@pajong
Copy link

pajong commented Jan 20, 2016

Hello,
I am trying to get drm info, but since EmeManager is a private property in player (https://github.com/google/shaka-player/blob/c103cf70d8fde2363d6ebfd15ab1142cd5e3f0cb/lib/player/player.js#L95), it is not possible to get the drm info.

Can I get some suggestions?

Thank you!

@tdrews
Copy link
Contributor

tdrews commented Jan 20, 2016

For protected content, you provide a callback to DashVideoSource that the library invokes each time it encounters a <ContentProtection> element in your manifest. Each time that callback is invoked you return a DrmInfo.Config object for that <ContentProtection> element. The DrmInfo objects inside EmeManager contain the information that your application should have provided itself, so you shouldn't really need to access them.

See https://shaka-player-demo.appspot.com/docs/tutorial-player.html, specifically the "Protected Content" section for an example.

@pajong
Copy link
Author

pajong commented Jan 20, 2016

@tdrews Thank you for the response.
In my content protection callback, I handle both widevine and playready. In the case where the manifest contains both of these content protections, it is not possible to know which one is used to play the video unless I look into the drmInfo.

@tdrews
Copy link
Contributor

tdrews commented Jan 20, 2016

I see. So you want to support both Widevine and Playready without your application explicitly choosing one, but you want to know which one the library chose? Is this right?

@pajong
Copy link
Author

pajong commented Jan 20, 2016

Yes, that is correct.

@tdrews
Copy link
Contributor

tdrews commented Jan 20, 2016

Well, there's no explicit mechanism at the moment. However, on Chrome the key system will be Widevine, and on IE the key system will be Playready; you could determine this via navigator.userAgent. Would that work as an interim solution while we look into what we might want to do for Shaka 2?

@pajong
Copy link
Author

pajong commented Jan 20, 2016

@tdrews Yes, that will work for an interim solution. Thank you so much!

@pajong pajong closed this as completed Jan 20, 2016
@joeyparrish joeyparrish added the type: enhancement New feature or request label Jan 25, 2016
@joeyparrish joeyparrish self-assigned this Jan 25, 2016
@joeyparrish joeyparrish added this to the v2+ milestone Jan 25, 2016
@joeyparrish joeyparrish reopened this Jan 25, 2016
@joeyparrish
Copy link
Member

We will consider exposing a key-system ID after 2.0. If there are more people interested in this feature, please speak up here and let us know.

@vincentma
Copy link

@tdrews By checking navigator.userAgent, it might be workaround here. However, if we are going use Shaka player in Chromecast (replace its own MediaPlayerLibary), then it might be a problem here because Chromecast support both playready and widevine.

https://developers.google.com/cast/docs/media#delivery-methods-and-adaptive-streaming-protocols

@tdrews
Copy link
Contributor

tdrews commented Apr 21, 2016

Good point. I'm going to bump this up to a v2.0.0 goal.

@tdrews tdrews modified the milestones: v2.0.0, v2+ Apr 21, 2016
@tdrews tdrews assigned tdrews and unassigned tdrews May 10, 2016
@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants