Pergunta

I'm working on a audio streaming app for reddit http://alienstream.com/ and for whatever reason my links randomly fail with "resource failed to load" mid track, I've been unable to find out the reason why, I double check the links and they're totally valid and download fine. I'm using mediafire to host my files and medialement.js for playback. Any idea why this might be happening?

Foi útil?

Solução

I switched to jplayer and I am still having the same issues

This seems to be a bug in chrome with streaming mp3 playback via html5 audio. It doesn't occur on firefox and if i fallback to flash it disappears, for now i've enbabled a "legacy option" and added the following line

error: function(e) {if(e.jPlayer.error.type=="e_url") {if(e.jPlayer.status!==undefined) {$("#player").jPlayer("play", e.jPlayer.status.currentTime)} else {next_track()}};}

This causes the song to stop for about a quarter of a second then resume in the exact spot it errored, obviously not ideal, but it's better than it was

Outras dicas

I found the following Here: https://groups.google.com/forum/#!topic/jplayer/o-d0XIC1YKM

"Having conducted some research into this -- there appears to be a systemic bug in Chrome that causes the connection to drop (most obvious with larger files). This is reported in several places. The fixes I have tried include the following: 1. Contact your host as ask if KEEP-ALIVE is set to the default ON or OFF -- you want it to be ON. 2. Insert the following code into your .htaccess file:

Header set Connection keep-alive 3. Set the "preload: auto" option as described below -- and also described in the API on the jplayer website. Yes -- overwrite 'metadata' with 'auto' on Line 248 of the jquery.jplayer.js file -- and upload!

I am still not getting 100% reliability with all of this -- but it does appear much improved."

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top