I'm trying to access an audio stream past a redirect, but I've come to notice 302's aren't supported by this library. I hacked a quick fix by editing the dist/player directly replacing require(https) with require('follow-redirects').https. follow-redirects is a drop-in replacement for http/https with support for redirects.
I'm not too familiar with the ES6 syntax for imports, so I didn't fork/PR, but I'd suggest using follow-redirects. In theory, it's a 3 liner! (one line to add the dependency in package-json, two lines for http/https).
I'm trying to access an audio stream past a redirect, but I've come to notice 302's aren't supported by this library. I hacked a quick fix by editing the
dist/player
directly replacingrequire(https)
withrequire('follow-redirects').https
. follow-redirects is a drop-in replacement for http/https with support for redirects.I'm not too familiar with the ES6 syntax for imports, so I didn't fork/PR, but I'd suggest using follow-redirects. In theory, it's a 3 liner! (one line to add the dependency in package-json, two lines for http/https).