Question

public class WowzaTest extends ModuleBase {
    public void onConnect(IClient client, RequestFunction function, AMFDataList params) {
        // how do i get stream name in this method or this class
    }
}

The player is wowza's test player. Rtmp request is rtmp://myip:1935/play/myStream.

Was it helpful?

Solution

You cannot get stream name in onConnect because RTMP streaming is actually splitted into 2 parts:

  1. connect to RTMP url (onConnect will happen here), where RTMP url is
    rtmp://ip/app[/appinst]
  2. send play command to play some stream

(in your case appinst is not present in your URL, so _definst_ will be used instead automatically)

you may want to handle play command:
http://www.wowza.com/forums/content.php?150-How-to-override-play-to-remap-a-stream-name

or do smth like this:
http://www.wowza.com/forums/content.php?329-How-to-use-IMediaStreamActionNotify3-interface-to-listen-for-RTMP-stream-events-%28includes-codec-info%29

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top