Skip to main content
Participant
February 8, 2011
Answered

How to get readers of the stream

  • February 8, 2011
  • 1 reply
  • 414 views

The question is, how I can create function on server-side, that returns users count reading current stream.

For example:

Client.prototype.returnStreamCount = function(streamName)

{

     ??????????????????

     return count;

}

I read all server-side API, and find only one function that can help me: getLiveStreamStats() - but how to use it on server?

    This topic has been closed for replies.
    Correct answer SE_0208

    Yes thats one way to do it or you can do it via http commands (for http you would have to modify Users.xml).

    Its always better to do it on server-side according to me as the server-side scripts are under your control. Also its always recommended that you don't open 1111 to outside world - so its best to do it on server side - you can always write client which just makes calls to server-side function and gets necessary information. I hope now you understand why it is better to do it on server than on client.

    1 reply

    Participating Frequently
    February 8, 2011

    You can call getLiveStreamStats() from server-side too if you want to use that. You can call it same ways as you would from client.

    Stasks65Author
    Participant
    February 8, 2011

    So, I need to create NetConnection on server-side, to rtmp://localhost:1111/admin, and then get data I need, using this connection??? looks like a convoluted way )))

    SE_0208Correct answer
    Participating Frequently
    February 9, 2011

    Yes thats one way to do it or you can do it via http commands (for http you would have to modify Users.xml).

    Its always better to do it on server-side according to me as the server-side scripts are under your control. Also its always recommended that you don't open 1111 to outside world - so its best to do it on server side - you can always write client which just makes calls to server-side function and gets necessary information. I hope now you understand why it is better to do it on server than on client.