Results 1 to 7 of 7

Thread: Test if connection is broadcasting

  1. #1

    Default Test if connection is broadcasting

    Hello,

    In the onConnect() function, how can I test if the client is broadcasting or viewing?

    lee

  2. #2

    Default

    Hello,

    Also, when the client is broadcasting, how can I get the name of the stream they are wanting to broadcast?

    lee

  3. #3
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    You can't tell in onConnect(). You can do it with IMediaStreamActionNotify3.onPublish() and IMediaStreamActionNotify3.onPlay()

    http://www.wowza.com/forums/content....es-codec-info)

    The IMediaStreamActionNotify3 have a IMediaStream param that you can get stream name from: stream.getName()

    Richard

  4. #4

    Default

    Thanks Richard.

  5. #5

    Default

    Hello,

    I have a follow-up question.

    I looked at the link you gave me and I see how I can use it for my needs.

    One thing I will need to do is get some settings that are loaded by my app.

    I looked at IMediaStreamActionNotify3 onPublish function and see it provides an iMediaStream object. I could not find a way to get an instance of the parent app in this object. However, I did see that it can get an iClient object that has the function getAppInstance() . Is this the only way I would be able to get the parent app or is there a way in iMediaStream that I am not seeing?

    take care,
    lee

  6. #6
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    lee,

    You can get Property settings from the Application.xml with WMSProperties:
    		
    String var = stream.getClient().getAppInstance().getProperties().getPropertyStr("var");
    You can also set a Property:
    stream.getClient().getAppInstance().getProperties().setProperty("var", "val");
    The Property setting has application instance scope, in memory, it is not written to the file.

    Richard

  7. #7

    Default

    Thanks Richard.

    I ended up doing it exactly this way.

    I am curious though why iStream does not have a getAppInstance() function. It seems to be present in so many other classes, but no this one.

    lee

Similar Threads

  1. Replies: 6
    Last Post: 02-06-2014, 03:34 AM
  2. Wowza Media Server 3 concurrent connection test Tool
    By davidyang888888 in forum General Forum
    Replies: 5
    Last Post: 10-31-2011, 08:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •