Native MP3 files not playable in iOS 8 when behind .htaccess

I've been sending some mp3s to a small community for a few years now, just linking directly to the MP3 and letting the device's browser handle the playback. Everything worked fine until users updated their iPhones to iOS 8. Now MP3 playback does not work initially. After a lot of testing, I seem to have narrowed it down to using .htaccess.

Here are two identical directories with the same mp3 and a directory with software listing in them. But one of them is password protected (U: music P: access).

Regular: http://danielmee.com/dl/
Provided by: http://danielmee.com/dl-secure/

I also tried using the JS player which also broke behind a safe directory. What has changed in iOS 8 to disable MP3 playback and is there a way to fix it?

+3


source to share


1 answer


The hoops that iOS does to play a music file are interesting, to say the least . Considering packet tracing, credentials are sent as expected for the initial file request, but subsequent partial requests do not have credentials. This is probably a bug in Safari; if you get a free developer account with Apple, you can report the issue to them .



HTTP authentication works like this: the browser requests a resource; the server responds with "401 authorization required" and includes a header WWW-Authenticate

indicating the type of authentication - in your case, basic - and "realm", which is just a way to group protected resources. The client re-requests the same resource, adding a header Authorization

that contains the username and password - in the case of basic auth, it just uses 64 users: pass. Typically, the browser caches these credentials and sends them unsolicited for each subsequent request within the same scope.

+2


source







All Articles