Skip to main content
niteshkumar
Inspiring
February 10, 2010
Question

How to know for publishing stream

  • February 10, 2010
  • 1 reply
  • 383 views

Hi all,

   I trying to make a application for multiple videoconferencing, in which more than one peaple can join. During my analysis I have got one issue:

   Suppose four users are making a conference meeting and all of them are publishing their respective videos. All the video are displayed on on each screen. But due to limited connection and bandwidth I am making connection or viewing each publisher one at a time in every 15 sec, which make still image. but I want to clear the video of the respective person who has either logged out or stop publishing. I have tried the netstream event i.e netstream.unPublishNotify but it works only when I have made connection for viewing. But sometimes it happens that I have no connection for viewing for that perticular person as per the timer. so I want to know who is publishing video at the time of making connection for that perticular view. How could it be possible to know whether the live stream is coming or not at the time of view.

Thanx in advance.

    This topic has been closed for replies.

    1 reply

    February 10, 2010

    Hi Nitesh

    I will try to state your requirement again to make sure I understand it correctly.

    You have 4 publishers who may or maynot be publishing to your FMS application(for video conferencing). You would like to know who is publishing at the moment so that you could proceed to view the feed from that publisher and close out all others.

    You mentioned you can't rely on the NetStream.Play.UnpublishNotify event received by the subscriber who is viewing the feed as the netconnection maynot be necessarily active for the subscriber. So instead of monitoring that part on the client side we could move it to server-side logic on FMS. In the main.asc of your FMS app you could use the Application class event handler:

    application.onPublish = function(clientObj,streamObj){

    clientObj.call("client-side-method",null,streamObj.name);  //the client side method should be defined in your client application.
    }

    Whenever a publisher connects to your FMS app and publishes live stream, this event handler would be invoked. streamObj is one of the parameters received which is a Stream object. You could then use streamObj.name property to identify the unique name of the livestream published by the publisher. You could then issue a Client.call from the server-side to a client side method and send the stream name across. In the client method you could write the logic based on the stream name you receive which live feed you want to activate for the user.

    Thanks

    Mamata