New issue
Advanced search Search tips

Issue 592889 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

canPlayType(): All MPEG containers accept "mp3" as a codec string

Project Member Reported by ddorwin@chromium.org, Mar 8 2016

Issue description

Both of the following return "probably":
1. document.createElement('video').canPlayType('audio/mpeg; codecs="mp3"')
2. document.createElement('video').canPlayType('audio/mp4; codecs="mp3"')

(1) is intentional. According to the comments in MediaCanPlayTypeTest.CodecSupportTest_mp3:
  // audio/mpeg with mp3 in codecs parameter. (Not RFC compliant, but
  // very common in the wild so it is a defacto standard).

However, (2) is not expected. "audio/mp4" and "video/mp4" should only support RFC 6381 compliant strings plus some very specific exceptions.

The reason for (2) is that kMP4AudioCodecsExpression and kMP4VideoCodecsExpression cause MimeUtil::MP3 to be supported by all MPEG containers, and "mp3" is one of three strings that get converted to MimeUtil::MP3.

Currently, there is only a (positive) test for "mp3" in the MediaCanPlayTypeTests.
 
The opposite is also true - the following returns "probably":
3. document.createElement('video').canPlayType('audio/mpeg; codecs="mp4a.69"')
Project Member

Comment 2 by bugdroid1@chromium.org, Mar 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1e03f7aebaf957701f8b480c9bb5dc757211047e

commit 1e03f7aebaf957701f8b480c9bb5dc757211047e
Author: ddorwin <ddorwin@chromium.org>
Date: Wed Mar 09 01:51:56 2016

media: Add tests for MP3 codec strings

"mp3" is only considered valid for "audio/mpeg". However, due
to bug 592889, all other MPEG containers have the wrong result.
Similarly, "mp4a.6x" variants should not be supported with
"audio/mpeg" but currently produces the wrong result.

Also made some test ordering more consistent/logical and fixed missing spaces.

BUG=592889

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

Cr-Commit-Position: refs/heads/master@{#380029}

[modify] https://crrev.com/1e03f7aebaf957701f8b480c9bb5dc757211047e/content/browser/media/media_canplaytype_browsertest.cc

Owner: ----
Status: Available (was: Assigned)
The fix for  issue 589675  fixed this for audio/x-m4a and video/x-m4v by not allowing MP3 with those containers.
Project Member

Comment 4 by sheriffbot@chromium.org, May 3 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been available for more than 365 days, and should be re-evaluated. Please re-triage this issue.
The Hotlist-Recharge-Cold label is applied for tracking purposes, and should not be removed after re-triaging the issue.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: chcunningham@chromium.org
Labels: -Pri-2 Pri-3
Cc: -chcunningham@chromium.org
Owner: chcunningham@chromium.org
Status: Assigned (was: Untriaged)

Sign in to add a comment