Wowza Community

How to stop liverepeater-edge stream from Java?


There is a stream running through edge application. How can we stop it from java? Stream source is provided by AliasProvider, so it wont launch again as AliasProvider will return wrong URL upon future client requests. But those who were already connected while it had proper alias resolve, keep watching it. Stream is not in MediaCasterStreamManager, we cant stop it from there.

We need to stop the stream, disconnect all clients connected to this stream, and completely purge it from edge application.

Any advice?

Many thanks, Alex.

Hello Alex,

If you are looking for some code to get you started in that direction, I’d suggest viewing our ModuleTimeDisconnect module in our collection. Take a look at the Disconnecter class as it demonstrates how to disconnect clients and you could use that as a starter for your new module.

Otherwise you can control the process by which the edge resolves the stream. Take a look at our event listeners for IMediaStreamNameAliasProvider2 interface. You can then make the determination of which streams are to be resolved by the respective origin(s) by handling the resolvePlayAlias and/or resolveStreamAlias events.



Hello Alex

That in conjunction with handling future requests via the IMediaStreamNameAliasProvider2 (as you are already) should handle it.



Hello Matt,

we already have IMediaStreamNameAliasProvider2 implemented, so we do control the way streams are resolved. But not resolving stream does not help with one that was already resolved and is being played. Do you say proper way to stop it is to just go through the clients/sessions and disconnect/shutdown everybody connected to this stream?