[Icecast] Tracking Listeners with Key and other parameters
Philipp Schafft
phschafft at de.loewenfelsen.net
Thu Nov 29 06:43:54 UTC 2018
Good morning,
On Tue, 2018-11-27 at 12:00 -0500, Alex Hackney wrote:
> I do have control over the headers. The webapp is built in php.
Ok.
> So the ideal path would be.
>
> 1) Client hits my web app for the m3u file.
>
> http://webapp.com/station-aac/listen.m3u
>
> 2) I create a session id and send that back with the icecast server path(s)
>
> http://east.icecastserver.com/station-aac
>
> http://west.icecastserver.com/station-aac
>
> 3) Client makes request to icecast and the url auth sends the request
> for auth back to the app where we log the session id again from the
> header as starting a session
>
> http://webapp.com/listener_joined
>
> 4) App returns the ok to icecast and the server begins the stream.
>
> 5) If the client drops and reconnects to icecast it already has the
> session in the header for the icecast path and we're good to go.
Yes.
> As far as source goes, since im sending the client to the web app first
> for the header and server path, I can take that query string there or
> just have a uri for the source.
>
>
> http://webapp.com/station-aac/listen.m3u?source=alexa
>
> OR
>
> http://webapp.com/station-aac/alexa/listen.m3u
>
> http://webapp.com/station-aac/android-app/listen.m3u
>
> http://webapp.com/station-aac/whatever/listen.m3u
Yes. But again, it's not a good idea to have that session string in
there, at least not with a non-namespaced parameter.
> Thanks for your help.
No problem.
With best regards,
>
> On 11/27/2018 5:13 AM, Philipp Schafft wrote:
> > This depends on if you control the HTTP(s) request made by the "app". If
> > you do, you can add a extra HTTP header in the request. How that is done
> > depends on the framework/lib/API you use for the app.
> >
> > Note that the header must be collision free with existing and future
> > headers. So likely you want it to start with "X-". Such as
> > "X-MySuperApp-Session".
> >
> > Then you can configure Icecast to send that header as part of the auth
> > request as you already found out in the manual.
>
--
Philipp Schafft (CEO/Geschäftsführer)
Telephon: +49.3535 490 17 92
Löwenfelsen UG (haftungsbeschränkt) Registration number:
Bickinger Straße 21 HRB 12308 CB
04916 Herzberg (Elster) VATIN/USt-ID:
Germany DE305133015
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part
URL: <http://lists.xiph.org/pipermail/icecast/attachments/20181129/d9abc219/attachment.sig>
More information about the Icecast
mailing list