4

According to the Mozilla's WebAudio API Rollout, WebAudio should be available in the Firefox 25.0.1. Yet, I cannot get createMediaElementSource to work on Firefox but it works fine in Chrome. Here is simplified version of the code:

var context = new AudioContext();
var el = document.getElementById('audio');
// Breaks in Firefox.  Remove these 2 lines and audio plays in Firefox
var sourceNode = context.createMediaElementSource(el);
sourceNode.connect(context.destination);

Here is a JSFiddle:
http://jsfiddle.net/marcoslin/Jb4LN/

If you hit play in the Fiddle result using Chrome, the audio plays. The music does not start in Firefox.

Here is a similar question without answer.

Community
  • 1
  • 1
marcoseu
  • 3,892
  • 2
  • 16
  • 35
  • check this one http://stackoverflow.com/questions/19708561/firefox-25-and-audiocontext-createjavascriptnote-not-a-function – Dileep stanley Dec 09 '13 at 12:21
  • @Dileepstanley indeed it is caused by Same-Origin Policy. Post the comment as an answer and I will accept it. – marcoseu Dec 09 '13 at 12:28

1 Answers1

1

I think it is related to the same origin policy mentioned in last comment. For testing your code i have downloded the music files and tested with a server where i have the html code, it works well with fx 25.0.1

Here is the link :http://www.alianetwork.it/fx/

Dileep stanley
  • 148
  • 1
  • 6