Commit 5dbe7568 authored by henriks@opera.com's avatar henriks@opera.com

Check HTMLMediaElement::supportsType() in MediaSource.isTypeSupported()

MediaSource.isTypeSupported() should not return true without making sure
that the HTMLMediaElement supports the content type as well.

BUG=402386
R=acolwell@chromium.org

Review URL: https://codereview.chromium.org/456313003

git-svn-id: svn://svn.chromium.org/blink/trunk@180035 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent a4c4650c
......@@ -243,6 +243,11 @@ bool MediaSource::isTypeSupported(const String& type)
if (contentType.type().isEmpty())
return false;
// Note: MediaSource.isTypeSupported() returning true implies that HTMLMediaElement.canPlayType() will return "maybe" or "probably"
// since it does not make sense for a MediaSource to support a type the HTMLMediaElement knows it cannot play.
if (HTMLMediaElement::supportsType(contentType, String()) == WebMimeRegistry::IsNotSupported)
return false;
// 3. If type contains a media type or media subtype that the MediaSource does not support, then return false.
// 4. If type contains at a codec that the MediaSource does not support, then return false.
// 5. If the MediaSource does not support the specified combination of media type, media subtype, and codecs then return false.
......
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