Search code examples
htmlhtml5-audiobasic-authentication

Is it possible to play audio that's behind basic authentication in Firefox?


I'm trying to play an audio file that's on a WebDAV server which uses basic authentication. I'm using an <audio> element and createMediaElementSource.

I'm currently using the following, which works in Chrome, but not Firefox.

<audio src="http://username:[email protected]" crossorigin="use-credentials" />

Anyone know an alternative way, or a way to get this to work in Firefox?


Solution

  • Solved by adding an authorization header through a service worker.