0

Possible Duplicate:
Why doesn’t Firefox support mp3 file format in <audio>

I am trying to embed a single mp3 file and not a playlist into a site using a Mozilla Add-on. My goal is for this file to play when ever a user visits a specific page, and not the entire site in general. I have chosen that websites Sitemap for an example. My main file is overlay.js, and I don't have any html based files, so I was wondering how would I make this possible, because I have searched the Q/A here, but majority of them explains how to use Audio for Html 5, rather then having a file play in javascript, or when ever a user clicks the Sitemap button. I have tried:

var audio = new Audio();
audio.src = "chrome://path/to/file.mp3";
audio.play();

It doesn't work.

Community
  • 1
  • 1

1 Answers1

0

Firefox does not support mp3 files. For more information try this: http://html5doctor.com/html5-audio-the-state-of-play/

Eruant
  • 1,816
  • 2
  • 14
  • 22