Wowza Community

What is the preferred way to use play/onPlay methods?

I am trying to create something like this:

https://www.wowza.com/docs/how-to-log-play-statistics-on-a-timer

But for RTMP, RTSP and HTTP inside the same module.

I am using onPlay to create a “watchdog” for RTMP and RTSP. Should I use play/onDisconnect to RTMP? Should I use onRTPSessionCreate/Destroy for RTSP? Should I use onHTTPSessionCreate/Destroy for HTTP (san jose, cuppertino, etc)?

Ping.

You could take a look at the following to extend that example accordingly:

See Richard’s response and note the following:

For RTSP, utilize the IRTSPActionNotify interface of which leverages the onRTPSessionCreate.

For HTTP, you can use the onHTTPSessionCreate event handler as you’ve suggested as well (should cover all http related protocols).

RTMP is the default mechanism involved here, so you can keep this as-is.

Alternatively, you could create a general thread that executes every ‘x’ number of seconds and iterates through all the clients to get the corresponding information and reports it in a similar fashion. You can see how to obtain a count/list of connected clients by protocol via the HTTP Provider found here (see second example).

Thanks,

Matt

Sorry for the confusion, I was suggesting that the module referred to here utilizes the IMediaStreamActionNotify3 interface of which will handle rtmp play events.

The problem with the HTTP Provider is that it has the overhead of HTTP protocol.

Also, it does not catch events like play/stop.

Thanks for the answer though. That IRTSPActionNotify looks useful.

What do you mean by:

RTMP is the default mechanism involved here, so you can keep this as-is.

?

Any feedback?