New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 644261 link

Starred by 5 users

Issue metadata

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



Sign in to add a comment

Audio canPlayType method returns wrong value for WAV ALAW codec

Reported by molokov....@gmail.com, Sep 6 2016

Issue description

Chrome Version       : 52.0.2743.116
URLs (if applicable) : https://codereview.chromium.org/25660014/
OS version           : OS X 10.10.5 (14F1808 
Network (such as Cable/DSL/Dial up etc): Cable
Audio/Video format (if applicable): WAV ALAW
Special chrome flags (if applicable):Behavior in Safari (if known): returns wrong value
Behavior in Firefox (if known): returns proper value

Video issue, Audio issue, both, neither? Audio issue

Flash or HTML5?  HTML5

If the browser or renderer crashed (“Aw, Snap”), please add any crash
IDs from chrome://crashes  (possibly after enabling crash reporting per
http://support.google.com/chrome/bin/answer.py?hl=en&answer=96817)

What steps will reproduce the problem?
(1) var myAudio = document.createElement('audio'); 
(2) myAudio.canPlayType('audio/wav; codecs="1"'); // Returns "probably". That's correct!
(3) myAudio.canPlayType('audio/wav; codecs="6"'); // Returns "" (i.e., not supported). That's not true, it's supported

What is the expected result? myAudio.canPlayType('audio/wav; codecs="6"') should return "probably" (see https://codereview.chromium.org/25660014/) 

What is the actual result? myAudio.canPlayType('audio/wav; codecs="6"') returns ""

Any additional information (anything else which may help us debug the
issue)? The ALAW codec is fully supported by the browser but when checked programmatically, the API says it doesn't


Please attach the HTML5/JavaScript code or audio/video files as well as
screenshot and/or videos (if applicable) 
A-LAW sample: http://www-mmsp.ece.mcgill.ca/documents/audioformats/wave/Samples/AFsp/M1F1-Alaw-AFsp.wav

 
And here is a way Mozilla handles type detection: https://hg.mozilla.org/mozilla-central/rev/daa046b2e17f
Cc: servolk@chromium.org ddorwin@chromium.org
I wasn't aware you could specify numeric codecs, +mime familiar folk.
Components: -Internals>Media Internals>Media>Codecs
Labels: OS-All
As far as I know, the "1" has never been explained in the code. It sounds like we need to understand the codecs string for "audio/wav" better and implement the correct set.
I believe one could use http://www.ietf.org/rfc/rfc2361.txt as a reference to map codec number to type (e.g., `0x0006 audio/vnd.wave;codec=6 WAVE_FORMAT_ALAW`).
this seems an eligible bug. anybody can take it?
Owner: dalecur...@chromium.org
Status: Assigned (was: Unconfirmed)
dale, nobody takes this bug voluntarily, can you assign appropriately?
Cc: dalecur...@chromium.org
Owner: tguilbert@chromium.org
Should be a fun dive into our MIME types code for Thomas.

Comment 8 by tguilbert@chromium.org, Yesterday (31 hours ago)

Owner: chcunningham@chromium.org
=> chcunningham@, which has most recently been in that code.

Sign in to add a comment