Commit 37502857 authored by Xiaohan Wang's avatar Xiaohan Wang Committed by Commit Bot

media: Update MediaDrmBridge comment on dummy key ID

The EME spec has been updated to formalize the way to populate key
statuses when key IDs are not available:

Whenever a non-empty list is appropriate, such as when the key session
represented by this object may contain key(s), populate the map with a
single pair containing the one-byte key ID 0 and the MediaKeyStatus most
appropriate for the aggregated status of this object.

This CL updates the comments in MediaDrmBridge where we implementate
this recommendataion to actually point to this part of the spec.

Bug: 883895
Change-Id: Ic6a98dcaaaa7550230e9db361e9eb21f169f0644
Reviewed-on: https://chromium-review.googlesource.com/c/1342806Reviewed-by: default avatarYuchen Liu <yucliu@chromium.org>
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609472}
parent 0eb3aee7
......@@ -76,9 +76,17 @@ public class MediaDrmBridge {
private static final UUID WIDEVINE_UUID =
UUID.fromString("edef8ba9-79d6-4ace-a3c8-27dcd51d21ed");
// On Android L and before, MediaDrm doesn't support KeyStatus. Use a dummy
// key ID to report key status info.
// See details: https://github.com/w3c/encrypted-media/issues/32
// On Android L and before, MediaDrm doesn't support KeyStatus at all. On later Android
// versions, key IDs are not available on sessions where getKeyRequest() has been called with
// KEY_TYPE_RELEASE. In these cases, the EME spec recommends to use a one-byte key ID 0:
// "Some older platforms may contain Key System implementations that do not expose key IDs,
// making it impossible to provide a compliant user agent implementation. To maximize
// interoperability, user agent implementations exposing such CDMs should implement this member
// as follows: Whenever a non-empty list is appropriate, such as when the key session
// represented by this object may contain key(s), populate the map with a single pair containing
// the one-byte key ID 0 and the MediaKeyStatus most appropriate for the aggregated status of
// this object."
// See details: https://www.w3.org/TR/encrypted-media/#dom-mediakeysession-keystatuses
private static final byte[] DUMMY_KEY_ID = new byte[] {0};
// Special provision response to remove the cert.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment