# Getting full rtmp link (onConnect)

**URL:** https://community.wowza.com/t/getting-full-rtmp-link-onconnect/40158
**Category:** Wowza Streaming Engine
**Created:** [August 20, 2015, 7:08am UTC](https://community.wowza.com/t/getting-full-rtmp-link-onconnect/40158 "2015-08-20T07:08:58Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![dogan\_dogan](https://avatars.discourse-cdn.com/v4/letter/d/58956e/32.png) [@dogan\_dogan](https://community.wowza.com/u/dogan_dogan)
#### Post date: [August 20, 2015, 7:08am UTC](https://community.wowza.com/t/getting-full-rtmp-link-onconnect/40158/1 "2015-08-20T07:08:58Z")

</div>

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

---

<div class="post-metadata">

### Author: ![SiggDev](https://avatars.discourse-cdn.com/v4/letter/s/dec6dc/32.png) [@SiggDev](https://community.wowza.com/u/SiggDev)
#### Post date: [August 24, 2015, 1:49pm UTC](https://community.wowza.com/t/getting-full-rtmp-link-onconnect/40158/2 "2015-08-24T13:49:14Z")

</div>

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);

}
