RESOLVED FIXED 119586
[EME] Implement MediaKeys.isTypeSupported()
https://bugs.webkit.org/show_bug.cgi?id=119586
Summary [EME] Implement MediaKeys.isTypeSupported()
Jer Noble
Reported 2013-08-08 11:39:15 PDT
[EME] Implement MediaKeys.isTypeSupported()
Attachments
Patch (17.77 KB, patch)
2013-08-08 11:48 PDT, Jer Noble
eric.carlson: review+
Jer Noble
Comment 1 2013-08-08 11:48:53 PDT
Eric Carlson
Comment 2 2013-08-08 12:02:18 PDT
Comment on attachment 208357 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=208357&action=review > Source/WebCore/Modules/encryptedmedia/MediaKeys.cpp:135 > + // 1. If keySystem contains an unrecognized or unsupported Key System, return false and abort these steps. > + // Key system string comparison is case-sensitive. > + if (keySystem.isNull() || keySystem.isEmpty() || !CDM::supportsKeySystem(keySystem)) > + return false; > + > + // 2. If type is null or an empty string, return true and abort these steps. > + if (mimeType.isNull() || mimeType.isEmpty()) > + return true; > + > + // 3. If the Key System specified by keySystem does not support decrypting the container and/or codec > + // specified by type, return false and abort these steps. > + if (!CDM::supportsKeySystemAndMimeType(keySystem, mimeType)) > + return false; Nit: it would be nice if this didn't have to ask the CDM if it supports the key system twice.
Jer Noble
Comment 3 2013-08-08 12:16:53 PDT
Jer Noble
Comment 4 2013-08-08 12:17:17 PDT
Chris Dumez
Comment 5 2013-08-08 12:22:32 PDT
Comment on attachment 208357 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=208357&action=review > Source/WebCore/Modules/encryptedmedia/MediaKeys.cpp:125 > + if (keySystem.isNull() || keySystem.isEmpty() || !CDM::supportsKeySystem(keySystem)) nit: The call to isNull() is redundant because it is already included in isEmpty(). > Source/WebCore/Modules/encryptedmedia/MediaKeys.cpp:129 > + if (mimeType.isNull() || mimeType.isEmpty()) Ditto
Note You need to log in before you can comment on or make changes to this bug.