Closed
Bug 1368583
Opened 7 years ago
Closed 7 years ago
Add deprecation warning for MediaKeySystemConfigurations without MediaKeySystemCapabilities, or with MediaKeySystemCapabilities with no codecs specified
Categories
(Core :: Audio/Video: Playback, enhancement, P3)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: cpearce, Assigned: cpearce)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-complete, site-compat)
Attachments
(1 file, 10 obsolete files)
As per Bug 1355252, the EME spec requires our navigator.requestMediaKeySystemAccess() function to reject request for configurations which don't contain at least one MediaKeySystemCapabilities (audioCapabilities or videoCapabilities).
That's step 15 of this algorithm:
https://w3c.github.io/encrypted-media/#get-supported-configuration-and-consent
We also shouldn't be assuming that WebM and MP4 normatively implies a specific set of codecs and codec constraints, as that violates step 10 of the "Get Supported Capabilities for Audio/Video Type" algorithm.
https://w3c.github.io/encrypted-media/#get-supported-capabilities-for-audio-video-type
Making this change has the effect of causing us to reject configurations with MediaKeySystemCapabilities where those capabilities don't specify a codec string.
We should add a deprecation warning to encourage authors to make their sites spec compliant. We should also have telemetry to measure how much of the internet we'll break if we start enforcing this.
Note, Chrome shipped these changes in M58.
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8872482 -
Flags: review?(gsquelart)
Comment hidden (mozreview-request) |
Comment 3•7 years ago
|
||
mozreview-review |
Comment on attachment 8872482 [details]
Bug 1368583 - Add deprecation warning for MediaKeySystemConfiguration properties no longer supported by the EME spec.
https://reviewboard.mozilla.org/r/144006/#review147720
r+ with suggestion & typo:
::: commit-message-8f1c4:9
(Diff revision 2)
> +navigator.requestMediaKeySystemAccess() function to reject request for
> +configurations which don't contain at least one MediaKeySystemCapabilities
> +(audioCapabilities or videoCapabilities).
> +
> +That's step 15 of this algorithm:
> +https://w3c.github.io/encrypted-media/#get-supported-configuration-and-consent
Would it be possible to link to the exact document version you're working with? -- Probably not that important; archeologists could trace the doc version based on this patch's date.
(And another one below)
::: commit-message-8f1c4:11
(Diff revision 2)
> +(audioCapabilities or videoCapabilities).
> +
> +That's step 15 of this algorithm:
> +https://w3c.github.io/encrypted-media/#get-supported-configuration-and-consent
> +
> +We also shouldn't be assuming that WebM and MP4 normatively implies a specific
'implies' -> 'imply'
Attachment #8872482 -
Flags: review?(gsquelart) → review+
Assignee | ||
Comment 4•7 years ago
|
||
mozreview-review-reply |
Comment on attachment 8872482 [details]
Bug 1368583 - Add deprecation warning for MediaKeySystemConfiguration properties no longer supported by the EME spec.
https://reviewboard.mozilla.org/r/144006/#review147720
> Would it be possible to link to the exact document version you're working with? -- Probably not that important; archeologists could trace the doc version based on this patch's date.
> (And another one below)
I don't think this is possible, as the draft spec is on a github-pages site, which by default serves the tip of master branch.
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8872482 -
Attachment is obsolete: true
Assignee | ||
Updated•7 years ago
|
Attachment #8872788 -
Attachment is obsolete: true
Attachment #8872788 -
Flags: review?(gsquelart)
Assignee | ||
Comment 6•7 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/fe2dfb7338a49e5e0c0b19be457a040d9288d1d4
Bug 1368583 - Add deprecation warning for MediaKeySystemConfiguration properties no longer supported by the EME spec. r=gerald
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment on attachment 8872803 [details]
Bug 1368583 - Implement SourceBufferResource::GetCachedDataEnd -
Sorry, wrong bug
Attachment #8872803 -
Attachment is obsolete: true
Attachment #8872803 -
Flags: review?(cpearce)
Attachment #8872804 -
Attachment is obsolete: true
Attachment #8872804 -
Flags: review?(cpearce)
Attachment #8872805 -
Attachment is obsolete: true
Attachment #8872805 -
Flags: review?(cpearce)
Attachment #8872806 -
Attachment is obsolete: true
Attachment #8872806 -
Flags: review?(cpearce)
Attachment #8872807 -
Attachment is obsolete: true
Attachment #8872807 -
Flags: review?(cpearce)
Attachment #8872808 -
Attachment is obsolete: true
Attachment #8872808 -
Flags: review?(cpearce)
Attachment #8872809 -
Attachment is obsolete: true
Attachment #8872809 -
Flags: review?(cpearce)
Attachment #8872810 -
Attachment is obsolete: true
Attachment #8872810 -
Flags: review?(cpearce)
Comment on attachment 8872788 [details]
Bug 1368583 - Add deprecation warning for MediaKeySystemConfiguration properties no longer supported by the EME spec.
(was wrongly obsoleted by incorrect push)
Attachment #8872788 -
Attachment is obsolete: false
Attachment #8872788 -
Flags: review?(gsquelart)
Comment 17•7 years ago
|
||
mozreview-review |
Comment on attachment 8872788 [details]
Bug 1368583 - Add deprecation warning for MediaKeySystemConfiguration properties no longer supported by the EME spec.
https://reviewboard.mozilla.org/r/144284/#review148110
Attachment #8872788 -
Flags: review?(gsquelart) → review+
Comment 18•7 years ago
|
||
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/062af1485e68
Use proper Unicode double-quotes in the MediaEMENoCodecsDeprecatedWarning key.
Comment 19•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/fe2dfb7338a4
https://hg.mozilla.org/mozilla-central/rev/062af1485e68
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Comment 20•7 years ago
|
||
Is this string what you actually wanted to land?
MediaEMENoCodecsDeprecatedWarning = Calling navigator.requestMediaKeySystemAccess() (at %S) without passing a candidate MediaKeySystemConfiguration containing audioCapabilities or videoCapabilities without a contentType with a "codecs" string is deprecated and will soon become unsupported.
It feels like a bad copy and paste from 'MediaEMENoCapabilitiesDeprecatedWarning', and 'without passing a candidate MediaKeySystemConfiguration containing audioCapabilities or videoCapabilities' should not be in this string.
I don't want to ask for this to be backed out, but I also want to fix it ASAP if it's an error (hence the double NI). Original commit was also amended by :ryanvm to pass tests.
https://hg.mozilla.org/mozilla-central/rev/062af1485e68
Flags: needinfo?(gsquelart)
Flags: needinfo?(cpearce)
Assignee | ||
Comment 21•7 years ago
|
||
(In reply to Francesco Lodolo [:flod] from comment #20)
> Is this string what you actually wanted to land?
Yes, but I'm open to improving the strings.
> MediaEMENoCodecsDeprecatedWarning = Calling
> navigator.requestMediaKeySystemAccess() (at %S) without passing a candidate
> MediaKeySystemConfiguration containing audioCapabilities or
> videoCapabilities without a contentType with a "codecs" string is deprecated
> and will soon become unsupported.
>
> It feels like a bad copy and paste from
> 'MediaEMENoCapabilitiesDeprecatedWarning', and 'without passing a candidate
> MediaKeySystemConfiguration containing audioCapabilities or
> videoCapabilities' should not be in this string.
These strings are deliberately similar, so that that UI is consistent.
Why do you think that 'without passing a candidate MediaKeySystemConfiguration containing audioCapabilities or videoCapabilities' should not be in this string? Could you elaborate?
I am happy to improve these strings. How can we make them better?
> I don't want to ask for this to be backed out, but I also want to fix it
> ASAP if it's an error (hence the double NI). Original commit was also
> amended by :ryanvm to pass tests.
> https://hg.mozilla.org/mozilla-central/rev/062af1485e68
Let me tell describe the context of where the string is, to help us understand how we can improve it.
The target audience of the string is web developers.
Firefox has a JS API navigator.requestMediaKeySystemAccess() which has two features that we're deprecating. We show the string in the Developer Console when JavaScript calls these deprecated APIs. So I don't expect people other than web developers to see it.
Here's an example showing how the function is used, and the two cases we're deprecating
var setOfInputs = [
// Case 1. Deprecated; no audioCapabilities or videoCapabilities supplied
{
initDataTypes: [ 'cenc' ],
},
// Case 2. Deprecated; no codec specified in the contentType member.
{
initDataTypes: [ 'cenc' ],
videoCapabilities: [ {
contentType: 'video/mp4'
} ]
},
// Case 3. Correct, at least one *Capabilities supplied with codecs specified.
{
initDataTypes: [ 'cenc' ],
videoCapabilities: [ {
contentType: 'video/mp4; codecs="avc1.640028"'
} ]
}
];
navigator.requestMediaKeySystemAccess(
'com.widevine.alpha', setOfInputs)
.then(function(keySystemAccess) {
...
} );
The function (navigator.requestMediaKeySystemAccess) takes a set of inputs (setOfInputsin this example), and we're deprecating inputs without "audioCapabilities or videoCapabilities" supplied (case 1 above), and we're also deprecating cases which do supply audioCapabilities and videoCapabilities but which don't have a "contentType" which specifies a "codecs" value (case 2 above). The correct usage is 3. above.
navigator.requestMediaKeySystemAccess checks every member in the set of inputs and will log the string to the console when the deprecated cases are encountered.
Given that context, how can we improve the strings?
Flags: needinfo?(gsquelart)
Flags: needinfo?(francesco.lodolo)
Flags: needinfo?(cpearce)
Comment 22•7 years ago
|
||
Thanks for the detailed explanation.
> The target audience of the string is web developers.
True, but localizers need to translate this, and they need to understand the sense of the sentence to do it properly.
> // Case 2. Deprecated; no codec specified in the contentType member.
> {
> initDataTypes: [ 'cenc' ],
> videoCapabilities: [ {
> contentType: 'video/mp4'
> } ]
> },
> The function (navigator.requestMediaKeySystemAccess) takes a set of inputs
> (setOfInputsin this example), and we're deprecating inputs without
> "audioCapabilities or videoCapabilities" supplied (case 1 above), and we're
> also deprecating cases which do supply audioCapabilities and
> videoCapabilities but which don't have a "contentType" which specifies a
> "codecs" value (case 2 above). The correct usage is 3. above.
Current string: "Calling navigator.requestMediaKeySystemAccess() (at %S) without passing a candidate MediaKeySystemConfiguration containing audioCapabilities or videoCapabilities without a contentType with a "codecs" string is deprecated and will soon become unsupported."
Let's try to strip it down to the minimum: "Calling X without passing a MediaKeySystemConfiguration containing audioCapabilities or videoCapabilities without a contentType with a "codecs" string is deprecated".
It looks like two sentences glued together, but that's also not case 2 as you described it here, is it? That would be: "Calling navigator.requestMediaKeySystemAccess() (at %S) passing a candidate MediaKeySystemConfiguration containing audioCapabilities or videoCapabilities without a contentType with a "codecs" string is deprecated and will soon become unsupported."
The first "without" shouldn't be there.
Flags: needinfo?(francesco.lodolo)
Updated•7 years ago
|
Flags: needinfo?(cpearce)
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8872788 -
Attachment is obsolete: true
Assignee | ||
Comment 24•7 years ago
|
||
Thanks Francesco, I've added a patch to make the changes you've suggested.
Flags: needinfo?(cpearce)
Comment 25•7 years ago
|
||
mozreview-review |
Comment on attachment 8873168 [details]
Bug 1368583 - Adjust MediaEMENoCodecsDeprecatedWarning string to make it clearer.
https://reviewboard.mozilla.org/r/144636/#review148668
Thanks. Note that normally you would need a new string ID, but in this case it's OK to use the existing one, since I was waiting for a fix to expose new strings to tools.
Attachment #8873168 -
Flags: review?(francesco.lodolo) → review+
Comment 26•7 years ago
|
||
Pushed by francesco.lodolo@mozillaitalia.org:
https://hg.mozilla.org/integration/autoland/rev/582b3347c32b
Adjust MediaEMENoCodecsDeprecatedWarning string to make it clearer. r=flod
Comment 27•7 years ago
|
||
bugherder |
Comment 28•7 years ago
|
||
Posted the site compatibility note: https://www.fxsitecompat.com/en-CA/docs/2017/navigator-requestmediakeysystemaccess-will-soon-require-mediakeysystemcapabilities-as-configurations/
Keywords: dev-doc-needed,
site-compat
Assignee | ||
Comment 29•7 years ago
|
||
(In reply to Kohei Yoshino [:kohei] from comment #28)
> Posted the site compatibility note:
> https://www.fxsitecompat.com/en-CA/docs/2017/navigator-
> requestmediakeysystemaccess-will-soon-require-mediakeysystemcapabilities-as-
> configurations/
Thank you!
Comment 30•7 years ago
|
||
Documentation updated:
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/requestMediaKeySystemAccess
While I was at it, I cleaned things up a bit, standardized the layout better, and added the missing section on exceptions.
Firefox 55 for developers updated as well.
Keywords: dev-doc-needed → dev-doc-complete
You need to log in
before you can comment on or make changes to this bug.
Description
•