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

Fix #1224 - only set non-empty MediaCapabilities on MediaKeySystemConfiguration #1602

Merged
merged 1 commit into from Oct 3, 2016

Conversation

davemevans
Copy link
Contributor

It seems that passing [] as a MediaKeySystemMediaCapability in MediaKeySystemConfiguration causes the requestMediaKeySystemAccess call to fail with NotSupportedError.

See #1224 and discussion on Slack today (19/9/2016) for background.

This PR checks whether the capabilities are empty and does not include them in the configuration object in that case.

I have tested this on Chrome with both clearkey and widevine. It'd be great if someone could take a look with other UA/CDM instances.

Copy link
Contributor

@dsparacio dsparacio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - liking the new review tools.

@sandersaares
Copy link
Member

sandersaares commented Sep 20, 2016

EME defines an empty list there as the default value, so treating a missing value as different sounds like a browser defect - I suggest filing a bug with the browser vendors, as well, to help get this corrected at the origin.

@davemevans
Copy link
Contributor Author

I've requested clarity from one of the EME editors. If I get a response I'll reply here and possibly take other actions as suggested by Sander.

In the meantime, I'm going to merge.

@davemevans davemevans merged commit 64d8942 into Dash-Industry-Forum:development Oct 3, 2016
@davemevans davemevans deleted the 1224 branch October 3, 2016 12:41
@davemevans
Copy link
Contributor Author

davemevans commented Oct 5, 2016

I received a helpful reply from David Dorwin who confirmed that the spec is correct and that we should expect this to work without the PR, but that the current implementation in Chrome was not up to date with the spec. A fix has landed in Canary (and Firefox Nightly I noticed) to implement this correctly.

If you try http://jsbin.com/roxeceteyu/edit?html,output in either Chrome Canary (55) or Firefox Nightly (52), you should see PASS, showing compliant behaviour.

The PR does no harm, its output remains compliant, and it will be required until the nightly browser versions become the stable versions, so I think we should keep it.

@dsparacio dsparacio added this to the v2.4.0 milestone Dec 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants