Audio functioning in chrome, but not firefox.

1,218 views
Skip to first unread message

dzunepwnsipod 72

unread,
May 15, 2015, 2:47:11 PM5/15/15
to mel...@googlegroups.com

  • OS platform / Browser: Ubuntu 14.04LTS Firefox34.0
  • melonJS version: melonJS-2.0.2.js
  • Extensive Bug description: Audio plays in chrome but not firefox. From the looks of it, it seems to me that firefox is trying to read an mp3 as an ogg.
  • How to reproduce the bug:  Go to http://linuxmustang.pw/melonJS/ in firefox
  • An extract of the Console log, to show possible exception/errors raised by the engine or the browser (below)
The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol. melonJS
The buffer passed to decodeAudioData contains an unknown content type. melonJS
The buffer passed to decodeAudioData contains an unknown content type. melonJS
The buffer passed to decodeAudioData contains an unknown content type. melonJS
The buffer passed to decodeAudioData contains an unknown content type. melonJS
The buffer passed to decodeAudioData contains an unknown content type. melonJS
The buffer passed to decodeAudioData contains an unknown content type. melonJS
me.audio.Error: melonJS: failed loading smile

My sound file is "data/bgm/smile/smile.mp3"

from my resource.js:
{name: "smile",             type: "audio", src: "data/bgm/smile/"},

from my play.js:
  onResetEvent: function()
 
{
 
   
// load a level
    me
.levelDirector.loadLevel("area01");
   
   
// reset the score
    game
.data.score = 0;
   
// play the audio track
    me
.audio.playTrack("smile");
   
...
}


can anyone see why this might work in chrome, but not work for firefox?

dzunepwnsipod 72

unread,
May 15, 2015, 7:43:33 PM5/15/15
to mel...@googlegroups.com
Update audio works on internet explorer. I'm thinking this may be a firefox bug. Will test.

dzunepwnsipod 72

unread,
May 15, 2015, 8:01:43 PM5/15/15
to mel...@googlegroups.com
Update 2: tested on firefox 38. Still not working.


Jay Oster

unread,
May 15, 2015, 9:07:51 PM5/15/15
to mel...@googlegroups.com, dzunepw...@gmail.com
You need to include Ogg-Vorbis format audio files for Firefox; it does not support MP3.

dzunepwnsipod 72

unread,
May 15, 2015, 10:24:59 PM5/15/15
to mel...@googlegroups.com, dzunepw...@gmail.com
oh. I did not know that. Thank you for the information.

dzunepwnsipod 72

unread,
May 16, 2015, 12:34:11 AM5/16/15
to mel...@googlegroups.com, dzunepw...@gmail.com
Update: I included the ogg-vorbis version of my audio file. Firefox still seems to be trying to read the mp3's and giving fatal errors it would seem.

Error console:

The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol. melonJS
The buffer passed to decodeAudioData contains invalid content which cannot be decoded successfully. melonJS
me.audio.Error: melonJS: failed loading smile <unknown>
The buffer passed to decodeAudioData contains invalid content which cannot be decoded successfully. melonJS
me.audio.Error: melonJS: failed loading cling <unknown>
me.audio.Error: melonJS: failed loading stomp <unknown>
me.audio.Error: melonJS: failed loading jump <unknown>
The buffer passed to decodeAudioData contains invalid content which cannot be decoded successfully. melonJS
me.audio.Error: melonJS: failed loading dst-inertexponent <unknown>
EncodingError: The given encoding is not supported.


On Friday, May 15, 2015 at 6:07:51 PM UTC-7, Jay Oster wrote:

Jay Oster

unread,
May 16, 2015, 3:52:43 AM5/16/15
to mel...@googlegroups.com, dzunepw...@gmail.com
Did you call me.audio.init("ogg,mp3"); ?

dzunepwnsipod 72

unread,
May 18, 2015, 11:55:52 AM5/18/15
to mel...@googlegroups.com, dzunepw...@gmail.com
I have indeed.

dzunepwnsipod 72

unread,
May 18, 2015, 11:59:26 AM5/18/15
to mel...@googlegroups.com, dzunepw...@gmail.com
actually, the line is...
me.audio.init("mp3,ogg");
...for me


On Saturday, May 16, 2015 at 12:52:43 AM UTC-7, Jay Oster wrote:

dzunepwnsipod 72

unread,
May 18, 2015, 12:40:13 PM5/18/15
to mel...@googlegroups.com, dzunepw...@gmail.com
Edit: I have changed the line to 
me.audio.init("ogg,mp3");
Firefox seems to not be trying to load the mp3's now, but also seems to have stopped trying to load anything. after 15 minuets, firefox has yet to load the game, who's entirety is 11.9 MB in size.




On Saturday, May 16, 2015 at 12:52:43 AM UTC-7, Jay Oster wrote:

Jay Oster

unread,
May 18, 2015, 3:03:07 PM5/18/15
to mel...@googlegroups.com, dzunepw...@gmail.com
It does work for me in Firefox (33.1 and 38.0.1) See screenshot showing the network console. a 1.3MB ogg file took 34 seconds to download.

steve.bra...@gmail.com

unread,
Nov 18, 2015, 9:20:19 AM11/18/15
to melonJS - A lightweight HTML5 game engine, dzunepw...@gmail.com
Under "Sound Settings" -> "Applications", make sure the "CubebUtils" slider is not muted (should have the firefox icon)



On Monday, 18 May 2015 20:03:07 UTC+1, Jay Oster wrote:
> It does work for me in Firefox (33.1 and 38.0.1) See screenshot showing the network console. a 1.3MB ogg file took 34 seconds to download.
>
>
>
>
>
>
Reply all
Reply to author
Forward
0 new messages