gaponov
gaponov

Reputation: 1032

How to get the full stream URL in a Wowza module?

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.

Upvotes: 4

Views: 2831

Answers (1)

ikikenis
ikikenis

Reputation: 340

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.

Upvotes: 3

Related Questions