Issue 166752 in chromium: document.createElement('audio').canPlayType('audio/ogg; codecs=opus') should be '' not 'probably'

35 views
Skip to first unread message

chro...@googlecode.com

unread,
Dec 18, 2012, 6:53:45 PM12/18/12
to chromi...@chromium.org
Status: Unconfirmed
Owner: ----
Labels: Webkit-JavaScript Pri-2 Via-Wizard Type-Bug OS-Linux

New issue 166752 by jan.ger...@gmail.com:
document.createElement('audio').canPlayType('audio/ogg; codecs=opus')
should be '' not 'probably'
http://code.google.com/p/chromium/issues/detail?id=166752

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.21 (KHTML, like
Gecko) Chrome/25.0.1359.3 Safari/537.21

Steps to reproduce the problem:
1. open console
2. document.createElement('audio').canPlayType('audio/ogg; codecs=opus')
3. return 'probably'

What is the expected behavior?
should return '', if a codec is specified, Chrome should return '' if that
codec is not supported.

What went wrong?
Instead of returning '' for unsupported codecs, Chrome returns probably, as
a result web authors can not use canPlayType to detect if Chrome supports a
given codec.

document.createElement('audio').canPlayType('audio/ogg; codecs=opus')
should return ''
document.createElement('audio').canPlayType('audio/ogg; codecs=flac')
should return ''

Did this work before? No

Chrome version: 25.0.1359.3 Channel: dev
OS Version:

chro...@googlecode.com

unread,
Jan 3, 2013, 3:13:46 PM1/3/13
to chromi...@chromium.org
Updates:
Status: Untriaged

Comment #3 on issue 166752 by ana...@chromium.org:
document.createElement('audio').canPlayType('audio/ogg; codecs=opus')
should be '' not 'probably'
http://code.google.com/p/chromium/issues/detail?id=166752

This does repro on Linux, with Chrome version 26.0.1374.0 (Developer Build
174829).
Hit F12 and select the "Console" tab (right-most)
Enter:
document.createElement('audio').canPlayType('audio/ogg; codecs=opus')

Result: 'maybe'

Expected: ''?

chro...@googlecode.com

unread,
Jan 5, 2013, 4:47:03 PM1/5/13
to chromi...@chromium.org

Comment #4 on issue 166752 by fbarch...@chromium.org:
document.createElement('audio').canPlayType('audio/ogg; codecs=opus')
should be '' not 'probably'
http://code.google.com/p/chromium/issues/detail?id=166752

M26 does support Opus if you enable it with a flag


chro...@googlecode.com

unread,
Jan 6, 2013, 4:21:50 AM1/6/13
to chromi...@chromium.org

Comment #5 on issue 166752 by jan.ger...@gmail.com:
document.createElement('audio').canPlayType('audio/ogg; codecs=opus')
should be '' not 'probably'
http://code.google.com/p/chromium/issues/detail?id=166752

so if the opus flag is enabled or once its enabled by default, it should be

document.createElement('audio').canPlayType('audio/ogg; codecs=opus')
== 'probably'
document.createElement('audio').canPlayType('audio/ogg; codecs=flac') == ''

and if its not or for any unsupported codec(i.e. FLAC) it should be ''

document.createElement('audio').canPlayType('audio/ogg; codecs=opus') == ''
document.createElement('audio').canPlayType('audio/ogg; codecs=flac') == ''


chro...@googlecode.com

unread,
Dec 12, 2013, 10:14:04 AM12/12/13
to chromi...@chromium.org

Comment #9 on issue 166752 by bugdro...@chromium.org:
document.createElement('audio').canPlayType('audio/ogg; codecs=opus')
should be '' not 'probably'
http://code.google.com/p/chromium/issues/detail?id=166752#c9

------------------------------------------------------------------------
r240320 | dalec...@chromium.org | 2013-12-12T14:20:02.105719Z

Changed paths:
M
http://src.chromium.org/viewvc/chrome/trunk/src/media/filters/ffmpeg_audio_decoder.cc?r1=240320&r2=240319&pathrev=240320
M
http://src.chromium.org/viewvc/chrome/trunk/src/media/filters/opus_audio_decoder.cc?r1=240320&r2=240319&pathrev=240320
M
http://src.chromium.org/viewvc/chrome/trunk/src/media/ffmpeg/ffmpeg_unittest.cc?r1=240320&r2=240319&pathrev=240320
M
http://src.chromium.org/viewvc/chrome/trunk/src/media/filters/ffmpeg_video_decoder.cc?r1=240320&r2=240319&pathrev=240320
M
http://src.chromium.org/viewvc/chrome/trunk/src/DEPS?r1=240320&r2=240319&pathrev=240320
M
http://src.chromium.org/viewvc/chrome/trunk/src/media/cdm/ppapi/ffmpeg_cdm_audio_decoder.cc?r1=240320&r2=240319&pathrev=240320
M
http://src.chromium.org/viewvc/chrome/trunk/src/media/filters/audio_file_reader.cc?r1=240320&r2=240319&pathrev=240320
M
http://src.chromium.org/viewvc/chrome/trunk/src/media/base/media_file_checker.cc?r1=240320&r2=240319&pathrev=240320
M
http://src.chromium.org/viewvc/chrome/trunk/src/media/cdm/ppapi/ffmpeg_cdm_video_decoder.cc?r1=240320&r2=240319&pathrev=240320
M
http://src.chromium.org/viewvc/chrome/trunk/src/media/filters/pipeline_integration_test.cc?r1=240320&r2=240319&pathrev=240320

FFmpeg fixups for M33 roll. Now with more Opus!

Besides the DEPs update there's also:
- Remove deprecated usage of avcodec_alloc_frame()
- Remove deprecated usage of pkt->pkt_pts
- Fix end trimming for ogg opus playbacks.
- Remove fragile bytes decoded check for end trimming.

Not all of the Opus issues are fixed yet, this just
pulls in the FFmpeg side of the fixes. Chrome changes
are in a followup patch set.

BUG=104241,166752,168524,315165
TEST=unittests, asan, ogg opus links from bugs.

Review URL: https://codereview.chromium.org/111153003
------------------------------------------------------------------------

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

chro...@googlecode.com

unread,
Dec 16, 2013, 2:18:18 PM12/16/13
to chromi...@chromium.org

Comment #11 on issue 166752 by dalecur...@chromium.org:
document.createElement('audio').canPlayType('audio/ogg; codecs=opus')
should be '' not 'probably'
http://code.google.com/p/chromium/issues/detail?id=166752

I didn't change any canPlayType behavior, but in M33 at least Opus will be
supported.

chro...@googlecode.com

unread,
Dec 16, 2013, 2:39:18 PM12/16/13
to chromi...@chromium.org
Updates:
Status: WontFix

Comment #12 on issue 166752 by fisc...@chromium.org:
document.createElement('audio').canPlayType('audio/ogg; codecs=opus')
should be '' not 'probably'
http://code.google.com/p/chromium/issues/detail?id=166752

This bug originally reported that chrome shouldn't claim to be able to deal
with opus-in-ogg because it couldn't. But now it can (bug 315165), so
canPlayType returning "probably" (as it does for me on 33.0.1736.3) is now
correct, making the originally-reported behavior "working as intended" :)
Reply all
Reply to author
Forward
0 new messages