Chromium Code Reviews| Index: media/blink/key_system_config_selector.cc |
| diff --git a/media/blink/key_system_config_selector.cc b/media/blink/key_system_config_selector.cc |
| index 885049c83872d0e5f80ec16863f6b8a501777af0..659f29bf118c5d03e4cd1570fa6b74fd7fa60aef 100644 |
| --- a/media/blink/key_system_config_selector.cc |
| +++ b/media/blink/key_system_config_selector.cc |
| @@ -310,6 +310,23 @@ bool KeySystemConfigSelector::IsSupportedContentType( |
| const std::string& container_mime_type, |
| const std::string& codecs, |
| KeySystemConfigSelector::ConfigState* config_state) { |
| + // contentTypes must provide a codec string unless the container implies a |
| + // particular codec. For EME, none of the currently supported containers |
| + // imply a codec, so |codecs| must be provided. |
| + if (codecs.empty()) { |
| + // Since the spec didn't initially require this, add an exemption for |
|
ddorwin
2016/04/25 22:58:51
If we want to exclude contentTypes without codecs
jrummell
2016/04/26 21:23:56
Acknowledged.
|
| + // some existing containers to give clients time to adapt. |
| + // TODO(jrummell): Remove this exemption once the number of contentTypes |
| + // without codecs drops low enough (UMA added in the blink code). |
| + // http://crbug.com/605661. |
| + if (container_mime_type != "audio/webm" && |
|
ddorwin
2016/04/25 22:58:51
This assumes the string is lower case, but that do
jrummell
2016/04/26 21:23:56
Done.
|
| + container_mime_type != "video/webm" && |
| + container_mime_type != "audio/mp4" && |
| + container_mime_type != "video/mp4") { |
| + return false; |
| + } |
| + } |
| + |
| // Check that |container_mime_type| and |codecs| are supported by Chrome. This |
| // is done primarily to validate extended codecs, but it also ensures that the |
| // CDM cannot support codecs that Chrome does not (which could complicate the |