I'm using audiojs to enable playing audio throught the <audio> tag, it works like axpected in every tested browser (on localhost and online) except firefox 23 when the site is online (it's fine on localhost) (not sure up to which version, I know it works on 23 and 29). When I try to play the mp3 file I get
TypeError: audio.element.pplay is not a function @ https://www.my-site-domain.ch/static/js/b.js:50288
I thought maybe the problem is the loading time so I tried to start the audio every 1000ms with a try/catch/setTimeout solution but it didn't work.
I thought I need to provide an ogg file but that didn't fix it (and what's the point of using audiojs if I have to provide an ogg file).
Here's my code:
html:
<audio src="/media/audio_files/5_D%C3%A4nker-Rundi.mp3" preload="auto"></audio>
js:
var AudioManager = function() {
this.init = function() {
audiojs.events.ready(function() {
var as = audiojs.createAll();
});
}
this.init();
}
var audioManager = new AudioManager();
And the generetade HTML from audiojs (this means audiojs is included correctly and it works):
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="audiojs0" name="audiojs0" style="position: absolute; left: -1px;" height="1" width="1">
<param name="movie" value="undefinedaudiojs.swf?playerInstance=audiojs.instances['audiojs0']&datetime=1398425816817.347">
<param name="allowscriptaccess" value="always">
<embed name="audiojs0" src="undefinedaudiojs.swf?playerInstance=audiojs.instances['audiojs0']&datetime=1398425816817.347" allowscriptaccess="always" height="1" width="1">
</object>
(note the src="undefinedaudiojs.swf", in the other browser there's the actual file name istead of undefined).
Link to audiojs: http://kolber.github.io/audiojs/