jaysalvat / buzz

Buzz is a small but powerful Javascript library that allows you to easily take advantage of the new HTML5 audio element. It tries to degrade silently on non-modern browsers.
http://buzz.jaysalvat.com
MIT License
1.21k stars 227 forks source link

MEDIA_ERR_SRC_NOT_SUPPORTED on iOS10 #108

Closed scarabdesign closed 8 years ago

scarabdesign commented 8 years ago

Happily using Buzz on all devices tried, but now after upgrading to iOS10, I'm getting MEDIA_ERR_SRC_NOT_SUPPORTED errors. Perhaps it's a streaming issue I'm having, however, my server supports 206 status, and the mime type in the header is set to audio/mpeg.

I'm not having a problem in iOS10 going to the Buzz demo page, but I'm thinking this is because your demo downloads all resources before playing, which is something my implementation cannot do.

Just as a test, I was able to play this link in any web browser not on my iPhone, but in Mobile Safari I'm unable to play it: http://buzz.jaysalvat.com/demo/sounds/truck.mp3

Indeed, this is most likely an Apple issue, but I'll buy you 3 beers if you help me solve it for us...

scarabdesign commented 8 years ago

I take it back; your audio file plays fine. It must be something with my server, but I can't tell what the issue is. It's a NodeJS server with Express 3. I'm sending the file with sendFile command. I'll let you know what I find. It just strikes me funny that only iOS 10 has problems. Even Chrome on that OS doesn't work, however, Chrome for IOS uses the UIWebView, so it's no surprise. Firefox on iOS also does not work.

scarabdesign commented 8 years ago

Interestingly, Mobile Safari on the iOS 10 Simulator streams my files just fine.

scarabdesign commented 8 years ago

Ok, so what I ended up doing was setting up nginx as a proxy to serve the files. I guess it's not ideal, but it works. Thanks again for the awesome library!

jaysalvat commented 8 years ago

Thanks for these feedbacks. I guess it's not a Buzz bug :)