Wowza Community

Getting full rtmp link (onConnect)

Dear Wowza Support-Team & Wowza Communtiy,

I would like to get the full url during onConnect

e.g. rtmp://localhost/live/myChannel

My approach was:

System.out.println(“onConnect Param1:” + getParamString(params, PARAM1));

System.out.println(“onConnect Param2:” + getParamString(params, PARAM2));

but both returns me “null”

i found a working solution with the “public void play(IClient client, RequestFunction function, AMFDataList params){}” method.

But when i use the “play” method the video doesn’t play.

Do you have any idea how can i get the “myChannel” part out of the Uri?

i also tried “getUri” but that method give me only the string till rtmp://localhost/live/ :/…

thank you for your time and help

I’m not sure what you mean by “But when i use the “play” method the video doesn’t play.”?

If you did everything right, you should get the stream name (“myChannel”) from PARAM1. Something like this should work:

public void play(IClient client, RequestFunction function, AMFDataList params)

{

WMSLoggerFactory.getLogger(null).info("onConnect Param1: " + getParamString(params, PARAM1));

invokePrevious(this, client, function, params);

}