WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
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+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Jer Noble
Comment 1
2013-08-08 11:48:53 PDT
Created
attachment 208357
[details]
Patch
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
Committed
r153838
: <
http://trac.webkit.org/changeset/153838
>
Jer Noble
Comment 4
2013-08-08 12:17:17 PDT
<
rdar://problem/14688350
>
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.
Top of Page
Format For Printing
XML
Clone This Bug