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

Idea: Add opaque "label" DOMString member to MediaKeySystemConfiguration #44

Closed
ddorwin opened this issue Mar 27, 2015 · 1 comment
Closed

Comments

@ddorwin
Copy link
Contributor

ddorwin commented Mar 27, 2015

It is possible that applications will pass long sequences of MediaKeySystemConfigurations to requestMediaKeySystemAccess(). The resulting configuration is accessible via MediaKeySystemAccess.getConfiguration(), but it may not be easy to determine exactly which configuration was selected. This is especially true when debugging, but it could also be useful in production scenarios. Since the resulting configuration is not the same object that was in the sequence passed to requestMediaKeySystemAccess(), object equality is not possible. Also, custom properties are lost.

Because this use case cannot be solved with custom properties, we should consider adding an identifier that user agents will preserve in the resulting configuration object. It would have no impact on the behavior of the algorithm, including configuration selection. This should have very low algorithmic and implementation overhead - lower than any other value currently in the dictionary. I propose the following for discussion:

dictionary MediaKeySystemConfiguration {
  ...
  DOMString label;
};
@joeyparrish
Copy link
Member

I would be in favor of this. In Shaka Player, we have to match the results of getConfiguration() back to our various usable streams, and currently, we do this using keySystem and contentType. A custom label would be significantly less error-prone, in my opinion, and simplify our code a lot.

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

No branches or pull requests

4 participants