srtrelay icon indicating copy to clipboard operation
srtrelay copied to clipboard

add an on_publish_done directive

Open parkervcp opened this issue 3 years ago • 2 comments

To match the on_publish support it would be good to also send done messages. This would also match rtmp and would be a way to tag a stream as offline.

nginx-rtmp docs https://github.com/arut/nginx-rtmp-module/wiki/Directives#on_publish_done

parkervcp avatar Mar 28 '21 18:03 parkervcp

I think the API is a bit problematic because it doesn't allow you to reliably know whether a stream is active or not. If either the relay or the api endpoint is restarted you can't really track the state anymore. It may be convenient but it's not really a good solution to the problem.

I think a better solution would be to poll the srtrelay api or nginx-rtmp api for that matter to see the currently active streams.

iSchluff avatar Mar 29 '21 17:03 iSchluff

We are already using the api to get active streams but the same page we have for auth also tracks "live" status. It's something we had and I noticed all the keys that were authenticated showed as live. Looking at the nginx rtmp options I saw we were using the done directive.

parkervcp avatar Mar 29 '21 19:03 parkervcp