Dear Wowza Community,
iam trying to get the Stream name from my edge ( in my edge, module). But the Streamlistener class which implements the “IMediaStreamActionNotify3” or “IMediaStreamActionNotify2” doenst work.
the methods onPlay or OnPublish etc. are not even triggered when the stream starts playing.
my question:
how can i get the stream name from the stream it plays?
thank you very much for your time and help.
kind regards
Does any body has an idea? I need the stream name in my edge module and want to do a database entry like i did in my origin application with the “onPlay and OnPublish” Methods.
thank you for your time and help.
Hi letheasoftware,
first of all thank your for your help.
I am using Wowza 4.1.0. I want to get the stream name for RTMP.
Which wowza version do you use ?
Did you add the module to your modules in conf/xx_aplication.xml ?
For getting the stream name while the client starts to play you need to override some methods.
ie : for http playback
you need to override
public void onHTTPSessionCreate(IHTTPStreamerSession httpSession) {
this.ip = httpSession.getIpAddress();
this.streamname = httpSession.getStreamName();
}
Hi oomworld, there is two way to solve this problem .
One of them I know and this one is walking around.
If you generate the stream url dynamically ,
all you need to add the stream name as a query string.
For rtmp query string is like that
rtmp://ip/loadbalance-origin?queryString=streamName/streamName
with this way
you can reach the query string via client on onConnect method .
here is sample code
public void onConnect(IClient client, RequestFunction function,
AMFDataList params) {
this.qs = client.getQueryStr();
and I found another way to get the stream name but not tested yet , I can guess it will work
List Names = client.getPlayStreams();
Iterator iter = Names.iterator();
with the iter.next you can reach , but as I told before , I’ve not worked on it yet.