I have an audio player that loads the src from a php script
this seems to have stopped working in Chrome with ogg files at some point, still works in Firefox, also works in chrome for mp3 and if the same ogg file is set directly as the src.
<audio id="audio1" controls >
<source src="" >
</audio>
<script>
var myaudio = document.getElementById("audio1");
myaudio.src = "http://localhost/f=filename&m=ogg";
//myaudio.src = "filename.ogg";//this works for the same ogg file
myaudio.addEventListener('loadeddata', function(){console.log('loaded ')}, false);
myaudio.addEventListener('canplay', function(){console.log('canplay ')}, false);
myaudio.addEventListener('canplaythrough', function(){console.log('canplaythrough ')}, false);
myaudio.addEventListener('error', function(){for( p in myaudio.error){console.log('error '+p)}; }, false);
</script>
this is the response header:
HTTP/1.1 200 OK
Date: Fri, 30 Jan 2015 15:33:52 GMT
Server: Apache/2.4.9 (Win32) mod_fcgid/2.3.9
X-Powered-By: PHP/5.4.25
Content-Disposition: attachment; filename=filename.ogg
X-Pad: avoid browser bug
Cache-Control: no-cache
Content-Transfer-Encoding: binary
Access-Control-Allow-Origin: *
Content-length: 13754
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Content-Type: audio/ogg
In Chrome I get the following errors logged to the console:
error code
error MEDIA_ERR_ABORTED
error MEDIA_ERR_NETWORK
error MEDIA_ERR_DECODE
error MEDIA_ERR_SRC_NOT_SUPPORTED
Aucun commentaire:
Enregistrer un commentaire