Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Listener Authentication - URL Method

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server
View previous topic :: View next topic  
Author Message
renato.webquest



Joined: 23 May 2014
Posts: 1

PostPosted: Fri May 23, 2014 5:05 pm    Post subject: Listener Authentication - URL Method Reply with quote

Hello guys,

I'm currently developing an web application for a radio stream and we decided to use IceCast since we have the opportunity to authenticate users during the initial request using the "URL method".

Currently our logic is authenticating the users accordingly but we have another requirement to only allow 3 devices (agents) connected to the radio stream at once per member account.

We have developed some listeners in our application to insert records into a database with all the accesses to the radio stream (after the "listener_add" is triggered), so we will be able to know exactly how many devices each member has currently connected to the radio stream at any given time.

However we're experiencing some issues with mobile devices. For some reason if a mobile device disconnects from the radio stream (either by refreshing the page or accessing a different URL), the "listener_remove" notifier is not being triggered like it usually is after an user disconnects on a desktop browser.

Could you guys please help me with this issue? Do we have any other special configuration that we need to setup on IceCast to make this to work?

Below is the configuration of our mount point:

Code:

<mount>
        <mount-name>/live.mp3</mount-name>
        <authentication type="url">
                <option name="mount_add"                value="http://application/icecast/notify/mount" />
                <option name="mount_remove"             value="http://application/icecast/notify/mount" />
                <option name="listener_add"             value="http://application/icecast/notify/listener" />
                <option name="listener_remove"          value="http://application/icecast/notify/listener" />
                <option name="allow_duplicate_users"    value="1" />
        </authentication>
    </mount>


And our limits (this is currently using the default configuration, but on production it will be updated accordingly to increase the number of clients):

Code:

 <limits>
        <clients>100</clients>
        <sources>2</sources>
        <threadpool>5</threadpool>
        <queue-size>524288</queue-size>
        <client-timeout>30</client-timeout>
        <header-timeout>15</header-timeout>
        <source-timeout>10</source-timeout>       
        <burst-on-connect>1</burst-on-connect>       
        <burst-size>65535</burst-size>
    </limits>


Thank you in advance.

Renato.
Back to top
View user's profile Send private message
konsolenritter



Joined: 08 Sep 2009
Posts: 18
Location: Germany

PostPosted: Tue May 27, 2014 12:00 pm    Post subject: Reply with quote

AFAIK the problem is any client that doesn't disconnect clean or the "official way". You should always deal with hanging or unclean, unfinished connections at all. This may be painfully caused in all situations by mobile clients (as you mentioned), proxies (holding the connection on behalf for a minute while the oiginal user disconnected meanwhile), unclear left connection drops (may concern the whole mobile device) and impatient reconnects and tries by users themself.

You should deal with it by recording and remembering (if even possible?) every single connection to the server, together with a timestamp and an ageing function. So you might go with a timeout, after which dead connections are purged from your counting database. Does such work for you?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber