Commit Graph

258 Commits

Author SHA1 Message Date
Chris Pearce
e80a3b5b24 Bug 1314452 - Remove IsGMPPresentOnDisk checks from Gecko. r=gerald
These are done in the GMPProvider, so it's unnecessary to do them again inside
Gecko. Plus, they cause main thread synchronous IPC in multi-process Firefox.


MozReview-Commit-ID: EcG38i3b2Oh

--HG--
extra : rebase_source : 37dffa797be13913131efb0019fd2e32c21b1fb6
2016-11-02 11:17:50 +13:00
Phil Ringnalda
b6eec64324 Merge m-c to a CLOSED TREE m-i
MozReview-Commit-ID: 2JxLeQ8GYIX
2016-10-27 20:36:38 -07:00
Chris Pearce
b691c3f403 Bug 1310879 - Remove EME persistent-license sessions. r=gerald
This removes the ability for ClearKey to instantiate persistent-license
sessions using the EME APIs.

MozReview-Commit-ID: FXj5YORxpas

--HG--
extra : source : b69b2435f1059a5c7b1dd26947ea500b381ec7f0
2016-10-18 15:42:02 +13:00
Chris Pearce
08bdd39606 Bug 1310879 - Check that only supported session types are instantiated. r=gerald
MozReview-Commit-ID: 6XkToIXzZL8

--HG--
extra : source : d1c0a7a2ff25005de82033081bee5eb10adea0c8
2016-10-28 11:43:26 +13:00
Chris Pearce
17c7c9d886 Bug 1310879 - Pass MediaKeySystemConfiguration to MediaKeys. r=gerald
MozReview-Commit-ID: 6tHlyRl4nWT

--HG--
extra : source : 5773f8dac74aaf05ec1c4f8585b3b148d51da324
2016-10-28 11:22:11 +13:00
Chris Pearce
8685a93e46 Bug 1313202 - Update MediaKeySession.close() to match EME spec. r=gerald
MozReview-Commit-ID: JgzOaACDUfc

--HG--
extra : rebase_source : 35ce6986bdc7e486b757df53fc59a63fb97014c3
2016-10-27 11:37:27 +13:00
Chris Pearce
ea73ebebc8 Bug 1311848 - Don't call ConnectPendingPromiseIdWithToken in MediaKeySession::Load. r=kikuo
We don't need to call MediaKeys::ConnectPendingPromiseIdWithToken() on the
MediaKeySession::Load() path, we already know the session Id, and we've already
removed the session from the list of pending sessions in Load().

MozReview-Commit-ID: KBiEsY95Csi

--HG--
extra : rebase_source : aadc3204409df35e4bbcb9532c530f860681afd1
2016-10-21 10:52:26 +13:00
Chris Pearce
22b1ca7b53 Bug 1311864 - Reject MediaKeySession::Load() for non temporary session types. r=kikuo
We are required to do this by the draft EME spec.

MozReview-Commit-ID: FnIEFgVId1z

--HG--
extra : rebase_source : 23042d3acda6cfcb379db457224d648dc955f688
2016-10-21 11:43:05 +13:00
Carsten "Tomcat" Book
2e7511ed5a merge mozilla-inbound to mozilla-central a=merge 2016-10-20 16:47:39 +02:00
Kilik Kuo
ede59e2ecf Bug 1310936- Provide a map to get pending MediaKeySession by promise Id correctly. r=cpearce
MozReview-Commit-ID: 34BL4GYoC1A

--HG--
extra : rebase_source : 4dffdf8da32412a6812716de9edbf685235ce442
2016-10-20 15:28:09 +08:00
Phil Ringnalda
8377010e6a Merge m-c to m-i
MozReview-Commit-ID: Ihd0iacfcIW

--HG--
rename : devtools/.eslintrc => devtools/.eslintrc.js
2016-10-18 19:45:02 -07:00
Kilik Kuo
4eecda6d84 Bug 1310958 - Reject promise with correct error in MediaKeySession::Load. r=cpearce
MozReview-Commit-ID: JuWGZCMfW6x

--HG--
extra : rebase_source : 59a9957cd3d37c0ef81cd6bc09f7b6eda3afac7b
2016-10-18 17:31:51 +08:00
Jon Coppeard
556585c65f Bug 1297558 - Remove explicit calls to Expose*ToActiveJS r=mccr8 2016-10-18 17:58:19 +01:00
Chris Pearce
e90255c806 Bug 1311252 - Make MediaKeyMessageEvent.webidl patch spec. r=smaug
Update our copy of EncryptedMediaExtensions.idl to match upstream
Web Platform Tests, so we keep passing.

MozReview-Commit-ID: IHaVX45GrYx
2016-10-19 20:33:54 +13:00
Chris Pearce
c2998283ca Bug 1309299 - make navigator.requestMediaKeySystemAccess() reject with TypeError for empty keysystem string or config. r=gerald
This makes us match the spec and pass more cases of
http://www.w3c-test.org/encrypted-media/drm-mp4-syntax-mediakeysystemaccess.html
but we still need to adjust the test so that it's consistent, as pointed out
by bz.

MozReview-Commit-ID: KEfRk4QnJKR

--HG--
extra : source : 72af37aaf2a0a42c20e64b3b455f0cb79e2b7eb1
2016-10-11 10:37:34 -07:00
Carsten "Tomcat" Book
f21768dc9c Backed out changeset aa789d732c6c (bug 1309299) for wpt-4 test failures on own test 2016-10-12 08:49:30 +02:00
Chris Pearce
b34a32e0bb Bug 1309299 - make navigator.requestMediaKeySystemAccess() reject with TypeError for empty keysystem string or config. r=gerald
This makes us match the spec and pass more cases of
http://www.w3c-test.org/encrypted-media/drm-mp4-syntax-mediakeysystemaccess.html
but we still need to adjust the test so that it's consistent, as pointed out
by bz.

MozReview-Commit-ID: KEfRk4QnJKR

--HG--
extra : source : a54ae0c94eefcf30270abad6463ed0becd0331db
2016-10-11 10:37:34 -07:00
Chris Pearce
ef74aeb8a8 Bug 1308076 - Use PsshParser to validate CENC init data. r=jwwang
Now that we can link gmp-clearkey's PSSH parser into Gecko, we can
simply use that inside MediaKeySession to validate that the CENC
init data matches the spec.

This change enforces that CENC init data uses the common system Id.
As far as I can tell, Widevine only uses that now.

MozReview-Commit-ID: HrlKQHcv5DI

--HG--
extra : source : f61138f1030e87026eb432e83d36e46c81e55b33
2016-10-06 23:17:44 +13:00
Chris Pearce
a52e1adba5 Bug 1308076 - Validate keyids json format. r=smaug
Use a WebIDL dict to define the "keyids" EME init data format, and
then use that to parse and validate incomint "keyids" EME init data
and ensure it's in the expected JSON format, i.e.:

https://w3c.github.io/encrypted-media/format-registry/initdata/keyids.html

This means we now pass the "generateRequest() with too short key ID."
case of encrypted-media-generate-request-disallowed-input.html
(upstream that is, our local copy of that WPT is out of sync).


MozReview-Commit-ID: 6W7j2a9Bg7E

--HG--
extra : source : fed2a26df89a5c2a600a6e6d1ab63ab86706fc45
2016-10-06 17:57:08 +13:00
Chris Pearce
1678efebbf Bug 1308076 - Basic validation of EME initData. r=jwwang
Implement more of MediaKeySession.generateRequest() to validate initData before
passing to CDM.

Also throw TypeErrors when initData is not valid, as per the spec.

Only trivial validation happens here, I'll add more comprehensive validation in
subsequent patches.

MozReview-Commit-ID: 3jTOsJNvRDo

--HG--
extra : source : d023aec75d1ef1486116510efcc31e2b587e6e50
2016-10-06 17:54:36 +13:00
James Cheng
7472ef82a6 Bug 1306219-Part3 Add logic to determine if Widevine keysystem is supported on Fennec. r=cpearce
MozReview-Commit-ID: 7lquhpJPYfW

--HG--
extra : rebase_source : 17f97d1574771fb52cece8d4331d6bc5c31cbad4
2016-10-04 11:45:34 +08:00
James Cheng
019d1cf24a Bug 1306219-Part1 Rename GMP_* into EME_* r=cpearce
MozReview-Commit-ID: Li05WWXqRj2

--HG--
extra : rebase_source : 18b195227384cb07a9127aa45f8acf0e5c174451
2016-10-04 11:45:08 +08:00
Kilik Kuo
34516e1303 Bug 1308121-Handle unrecognized content type parameter when trying to get supported capability. r=cpearce
MozReview-Commit-ID: GqSjn6BjhTi

--HG--
extra : rebase_source : 9aa4f67b99c376d1b525e72ef60b3cdcdaa68b4d
2016-10-07 00:45:27 +08:00
Kilik Kuo
55bf555b74 Bug 1303922 - Part 2: Remove KeyStatusChanged/ForgetKeyStatus IPDL messages. r=cpearce
MozReview-Commit-ID: Flx2SQI7lM0

--HG--
extra : transplant_source : %40p%5C%C3%06%D0m%0C/%7B%0C%5B%A2%93o%F6%A1%1B%00%7D
2016-10-04 17:19:53 +08:00
Kilik Kuo
4d162fcd4a Bug 1303922 - Part 1: Make EME keystatuschanged information notified in batch. r=cpearce
MozReview-Commit-ID: IeExaQ62qTF

--HG--
extra : transplant_source : t%D4%AFxu%D6%40%F8hU%D2%94%D4q8q%EDy%08-
2016-10-04 17:18:46 +08:00
Carsten "Tomcat" Book
02f4754fbc merge mozilla-inbound to mozilla-central a=merge 2016-10-04 11:58:07 +02:00
Chris Pearce
b2629e2eec Bug 1307248 - Replace uses of CompareUTF8toUTF16(kEMEKeySystem*) with Is*KeySystem(). r=jwwang
MozReview-Commit-ID: BTTacIyYfGZ

--HG--
extra : rebase_source : 4c3146ce7ca597c33871e8fb76b1c86d93c24ef7
2016-10-04 09:48:28 +13:00
Chris Pearce
5215e69245 Bug 1307248 - Add Is{Primetime,Widevine}KeySystem() functions. r=jwwang
MozReview-Commit-ID: GnH0T8IJhgR

--HG--
extra : rebase_source : cbaa64436e8ce034f6c953afa74001054f2ade0a
2016-10-04 09:40:32 +13:00
Stone Shih
d76caea5e4 Bug 1292063 - Part 1: Add Event.composed. r=smaug
--HG--
extra : rebase_source : 105f9cfddb083d48d3da25fa13bf9a3b4c2637f6
2016-08-31 11:16:11 +08:00
Chris Pearce
f40bbc42f7 Bug 1305552 - Add telemetry to track uses of MediaKeySession.generateRequest. r=francois,gerald
This allows us to track how often EME CDMs are used, rather than just created.
The telemetry I added in bug 1304207 is reports whenever a CDM is created, but
some sites, such as the Shaka Player demo site, create CDMs without using them,
so that telemetry isn't a great measure in helping us detect when CDMs aren't
being used. Whereas the telemetry added here will report when the CDMs are used
to negotiate a license, i.e. when the CDMs are actually being used.


MozReview-Commit-ID: ExMIcIIBvS1
2016-09-27 15:01:06 +13:00
Carsten "Tomcat" Book
ce8c91d458 Merge mozilla-central to mozilla-inbound 2016-09-22 11:56:22 +02:00
Chris Pearce
39789bfc59 Bug 1304250 - Implement MediaKeySession.onmessage. r=smaug
MozReview-Commit-ID: FDpvsoFwy6C

--HG--
extra : rebase_source : d569107d6c473d24800e2e4c97d6408ac81eb09b
2016-09-21 14:56:20 +12:00
Chris Pearce
a509ea65bc Bug 1304249 - Implement MediaKeySession.onkeystatuseschange. r=smaug
MozReview-Commit-ID: 1LnDi1MmXi2

--HG--
extra : rebase_source : e12a4085ad2462f1157ab4ea0552a239cd7499dc
2016-09-21 14:31:15 +12:00
Chris Pearce
3d1e5d28dd Bug 1304207 - Add telemetry to track when EME CDMs are instantiated. r=francois,gerald
Add opt-out telemetry probe to track which EME CDMs are being instantiated.
This will enable us to determine when it's safe to remove the Adobe CDM.


MozReview-Commit-ID: iEPSTk7UtP

--HG--
extra : rebase_source : fb51d77f4c15fe2d9ef0adf3c87f6125bb758b9c
2016-09-21 10:45:02 +12:00
Boris Zbarsky
0fd831e559 Bug 1302304. Remove IDL bits that reference nsIDOMMediaError; it's not needed anymore. r=bkelly 2016-09-15 11:41:35 -04:00
Jean-Yves Avenard
6a25692b20 Bug 1299072: P10. Pass decoding error details to media element's error attribute. r=jwwang
MozReview-Commit-ID: 49DurV9WI5S

--HG--
extra : rebase_source : 469e6ed4e222fb6d6ac34843c3c3346a044c6023
2016-09-11 00:56:09 +10:00
JW Wang
d13f41c2a0 Bug 1294616 - Somewhat improve the string performance by defining string literals whose length is known at compile time. r=cpearce
MozReview-Commit-ID: LAlqMDtGQN7

--HG--
extra : rebase_source : 4f2cdc9cb9ee7e4dd024d47dad329304f6ba70ae
extra : source : 6db22a524b1452fc50bf56535e7c619a8441dcfe
2016-08-15 15:41:53 +08:00
James Cheng
c6899c4863 Bug 1290830 - [Part2] Remove the GMP types using genral types instead. r=cpearce
MozReview-Commit-ID: 3EKwTNPddI1

--HG--
extra : rebase_source : 00f7267a76ad299b52d02b16425bb266ee58985b
2016-08-02 15:05:21 +08:00
James Cheng
b74f50bca9 Bug 1290830 - [Part1] Detach the GMPDecryptorProxyCallback interface to DecryptorProxyCallback. r=cpearce
MozReview-Commit-ID: EPGf0ITakPO

--HG--
extra : rebase_source : 1186be0680789c1f9e66366e549fd5ec5b418a38
2016-08-01 17:37:18 +08:00
James Cheng
0593e89ea0 Bug 1293194 - Building with --disable-eme fails with GMPDecoderModule.cpp:15:30: fatal error: mozilla/EMEUtils.h: No such file or directory. r=cpearce
MozReview-Commit-ID: VUGdiaLqkV

--HG--
extra : rebase_source : 3439ba2f7a81ad80f9db514f21c6091cc3e5711a
2016-08-09 12:13:30 +08:00
Kaku Kuo
a6ed727230 Bug 1292091 - Part 2 - replace MaybeResolve(JS::UndefinedHandleValue) with MaybeResolveWithUndefined(); r=bz
MozReview-Commit-ID: KNbxVcCVqts

--HG--
extra : transplant_source : %1D%18%E5%C9o%F0%29%E7%E0%93%EEcR%C7B%3BeX%B3%87
2016-08-09 17:15:13 +08:00
Chris Pearce
b4c569d8b8 Bug 1293101 - Refactor CDMCaps.cpp to treat keys marked as output-restricted as usable in all cases. r=gerald
This is a follow up from bug 1289623, as I missed a few cases in that bug.

MozReview-Commit-ID: DM7FtVSZUo3

--HG--
extra : rebase_source : 4fd7ae93b1418ded54f0c21a50a654fc962d4892
2016-08-08 10:41:38 +12:00
Chris Pearce
7261eef5aa Bug 1289942 - Make MediaKeyStatusMap.get() return undefined for unknown keys. r=bz
The spec requires the MediaKeyStatusMap.get(keyId) function to return an 'any'
type, which is undefined for known keys, or a MediaKeyStatus enum value for
known keys.

https://w3c.github.io/encrypted-media/#idl-def-mediakeystatusmap


MozReview-Commit-ID: 3TOFYLacZSc

--HG--
extra : rebase_source : cd067f545cdbd9352ba64fea914128201b458d9c
2016-07-28 14:03:01 +12:00
Bryce Van Dyk
e06afda01b Bug 1279077 - Update GMP/EME path to support webm. r=cpearce
Update handling of VP8, VP9 to enable decryption and decoding via widevine.
Update handling with further validation to make sure that invalid video types
are rejected when trying to create widevine decryptor session or init widevine
decoders.

MozReview-Commit-ID: 8FOvUJfxr6L

--HG--
extra : rebase_source : 0f6aed8256d7f106a598b09e6f11efe80f0e4bb2
2016-07-29 15:53:22 +12:00
James Cheng
240e465d99 Bug 1288320 - Define each keysystem string as specific identifier instead of placing some.keysystem everywhere. r=cpearce
MozReview-Commit-ID: 1bwPRhMOawu

--HG--
extra : amend_source : 7550352f178c0082484acdd342db05ed0dc02e23
extra : transplant_source : %96%C1%B9%8B%28%B0%96f%8AM%AA%13T%1E%3Bg%98%96%92%C1
2016-07-27 16:07:46 +08:00
Carsten "Tomcat" Book
7293066753 merge mozilla-inbound to mozilla-central a=merge 2016-07-27 16:35:44 +02:00
Chris Pearce
5d7e74fc64 Bug 1289623 - Assume keys marked as 'output-restricted' are usable. r=gerald
Chrome appears to do this.

MozReview-Commit-ID: LbSFQiB0pEO

--HG--
extra : rebase_source : 2e4358ccc2bcfec0f9d286456f726400cfe0e13c
2016-07-27 11:06:43 +12:00
Tim Huang
71ca0b6bc8 Bug 1283325 - Part 1 : Make EME Plugins / Gecko Media Plugins storage OriginAttribute aware. r=cpearce 2016-07-22 08:40:00 +02:00
Kilik Kuo
3de7882657 Bug 1136707 - [Part1] Make pref 'media.eme.enabled' only affect practical DRMs. r=cpearce
MozReview-Commit-ID: 5XeAelzLbIc

--HG--
extra : transplant_source : J%7D%FE%B8%CC3%CF%E7%BAg%A7%3E%19%DDC%C0%EB%92%AD%C8
2016-07-27 12:04:47 +08:00
Carsten "Tomcat" Book
b9a6c687fa merge mozilla-inbound to mozilla-central a=merge 2016-07-25 15:50:41 +02:00