Jay Nicholas
2014-Oct-12 05:06 UTC
[Icecast] Playback of URL Authenticated Stream in Browser
Hello! I'm having trouble embedding my url-authenticated stream on my website on certain browsers. I'm hoping someone can offer some advice. My site offers a subscription to the stream where the username and password are system-generated and unique to the subscriber. The system-generated password is stored in the database and passed to the page based on which subscriber is logged in. Since the username and password are system-generated and unique to each subscriber, I'm not concerned about passing the username and password in the URL for the Icecast server authentication. Embedding the following URL in my HTML5 audio player works in Safari and Firefox: http://theusername:thepassword at myicecastserver.com/my-mount-point However, this method doesn't work in Chrome or Internet Explorer because these browsers don't support passing the username and password in the URL. (If I embed a mount URL in Chrome or Internet Explorer without authentication it works just fine so I know it's the authentication that is the problem. It's not a player compatibility issue.) In Chrome it still prompts for the username and password. In Internet Explorer it just simply doesn't work. Does anyone have any guidance regarding how I can pass the username and password authentication header with javascript, php, or another method? Thanks! Jay -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/icecast/attachments/20141012/2f3096b5/attachment.htm
Jay Nicholas:> Does anyone have any guidance regarding how I can pass the username and > password authentication header with javascript, php, or another method?i'd use ajax / XHTTP-requests, maybe within jquery. see for example http://stackoverflow.com/questions/5507234/how-to-use-basic-auth-and-jquery-and-ajax
Brad Isbell
2014-Oct-19 02:21 UTC
[Icecast] Playback of URL Authenticated Stream in Browser
Chrome and Internet Explorer *do* support passing in credentials in the URL. Can you narrow down the problem by firing up Wireshark and doing a packet capture? Then, post the request and response headers in a new message so we can take a look. Brad Isbell brad at musatcha.com http://www.musatcha.com On Sun, Oct 12, 2014 at 12:06 AM, Jay Nicholas <jaynicholas at gmail.com> wrote:> Hello! > > I'm having trouble embedding my url-authenticated stream on my website on > certain browsers. I'm hoping someone can offer some advice. > > My site offers a subscription to the stream where the username and > password are system-generated and unique to the subscriber. The > system-generated password is stored in the database and passed to the page > based on which subscriber is logged in. Since the username and password are > system-generated and unique to each subscriber, I'm not concerned about > passing the username and password in the URL for the Icecast server > authentication. > > Embedding the following URL in my HTML5 audio player works in Safari and > Firefox: > > http://theusername:thepassword at myicecastserver.com/my-mount-point > > However, this method doesn't work in Chrome or Internet Explorer because > these browsers don't support passing the username and password in the URL. > (If I embed a mount URL in Chrome or Internet Explorer without > authentication it works just fine so I know it's the authentication that is > the problem. It's not a player compatibility issue.) In Chrome it still > prompts for the username and password. In Internet Explorer it just simply > doesn't work. > > Does anyone have any guidance regarding how I can pass the username and > password authentication header with javascript, php, or another method? > > Thanks! > > Jay > > _______________________________________________ > Icecast mailing list > Icecast at xiph.org > http://lists.xiph.org/mailman/listinfo/icecast > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/icecast/attachments/20141018/32fedb6d/attachment.htm