chromium with non-free does not say "maybe" to audio/mpeg

Asked by Max Berger

Since there is no bug tracker ( Question #66086 ), here is my bug report:

- Installed chromium-browser from daily (but is the same with fta)

  var a = document.createElement("audio");
  document.write(v.canPlayType('audio/mpeg'));

returns "", as it should

  document.write(v.canPlayType('audio/ogg; codecs="vorbis"'));
returns "probably" as it should.

- Installed chromium-codecs-ffmpeg-nonfree , replacing the default codecs

However, the output of the above javascript is still the same.

Expected behaviour: audio/mpeg should return "maybe" or "probably"

Question information

Language:
English Edit question
Status:
Solved
For:
Chromium Browser Edit question
Assignee:
No assignee Edit question
Solved by:
Evan Martin (Chromium)
Solved:
Last query:
Last reply:
Revision history for this message
Evan Martin (Chromium) (evan-chromium) said :
#1

I would be surprised if this didn't also affect Google Chrome, but it could be a codec packaging bug.
Have you tried Google Chrome as well?

Revision history for this message
Max Berger (max-berger) said :
#2

Here is the script I am using:

---
<html><head><title></title><style type='text/css'><!--
.center { text-align: center; }
--></style><script type='text/javascript' language='javascript'>

function supports_video() {
  return !!document.createElement('video').canPlayType;
}

function doit() {
  if (!supports_video()) {
  document.write('no html5 video');
    return;
   }

  var v = document.createElement("video");

  document.write("mp4: ");
  document.write(v.canPlayType('video/mp4'));
  document.write('<br/>');
  document.write("video/ogg: ");
  document.write(v.canPlayType('video/ogg'));
  document.write('<br/>');
  document.write("video/ogg/theora: ");
  document.write(v.canPlayType('video/ogg; codecs="theora"'));
  document.write('<br/>');
  document.write('<br/>');

  var a = document.createElement("audio");
  document.write("mp3: ");
  document.write(v.canPlayType('audio/mpeg'));
  document.write('<br/>');
  document.write("audio/ogg: ");
  document.write(v.canPlayType('audio/ogg'));
  document.write('<br/>');
  document.write("audio/ogg/vorbis: ");
  document.write(v.canPlayType('audio/ogg; codecs="vorbis"'));
  document.write('<br/>');

}

document.write("Empty answer means no<br/><br/>");
doit();
document.write("<br />done.");
</script></head><body>
</body>
</html>
---

On Chromium-Browser the output is:
Empty answer means no

mp4:
video/ogg: maybe
video/ogg/theora: probably

mp3:
audio/ogg: maybe
audio/ogg/vorbis: probably

done.
---
On Chrome (Windows) the answer for "mp4" is "maybe", but for mp3 it is the same (empty).

So (unfortunately) the bug is not in audio/mpeg, but rather in video/mp4

Revision history for this message
Best Evan Martin (Chromium) (evan-chromium) said :
#3

This sounds like
  http://code.google.com/p/chromium/issues/detail?id=21318

You can star that for updates.

Revision history for this message
Max Berger (max-berger) said :
#4

Thanks Evan Martin, that solved my question.