According to the Mozilla WebAudio Rollout API , WebAudio must be available in Firefox 25.0.1. However, I cannot get it to createMediaElementSourcework with Firefox, but it works fine in Chrome. Here is a simplified version of the code:
var context = new AudioContext();
var el = document.getElementById('audio');
var sourceNode = context.createMediaElementSource(el);
sourceNode.connect(context.destination);
Here is the JSFiddle:
http://jsfiddle.net/marcoslin/Jb4LN/
If you click the game in the Fiddle results using Chrome, the sound will play. Music does not start in Firefox.
Here is a similar unanswered question.
source
share