4

I am writing a module for Wowza media server.

How can I get the full URL to a stream within the onPublish() method in my implementation of IMediaStreamActionNotify2?

At the moment I can only find the stream name.

Christofer Eliasson
  • 32,939
  • 7
  • 74
  • 103
gaponov
  • 1,012
  • 1
  • 12
  • 22

1 Answers1

3

You may want to check the Client object. It contains a method to get the stream URI.

Something like this:.

@Override
public void onPublish(IMediaStream stream, String streamName, boolean isRecord,
        boolean isAppend) {
    IClient client = stream.getClient();
    String uri = client.getUri(); 
    // This will print rtmp://127.0.0.1/live in my test server
}

The Client object also contain methods to get the querystring by client.getQueryStr() and other handy methods you can see at server-side api documentation.

Christofer Eliasson
  • 32,939
  • 7
  • 74
  • 103
ikikenis
  • 340
  • 1
  • 7