kyriesent / node-rtsp-stream

Stream any RTSP stream and output to websocket for consumption by jsmpeg (https://github.com/phoboslab/jsmpeg). HTML5 streaming video! Requires ffmpeg.
MIT License
451 stars 166 forks source link

Update videoStream.js #92

Open zgmunshi opened 1 month ago

zgmunshi commented 1 month ago

Add clientCount emitter for stream

Using this we can track how many clients are connected to particular stream and it will also provide an option to stop the stream if there is no viewer.

I was having similar requirement, so i added this change, hopefully this will be helpful for others too.