winshining / nginx-http-flv-module

A media streaming server based on nginx-rtmp-module. In addtion to the features nginx-rtmp-module provides, HTTP-FLV, GOP cache, VHosts (one IP for multi domain names) and JSON style statistics are supported now.
BSD 2-Clause "Simplified" License
2.72k stars 567 forks source link

Getting the viewer count in one request with the stream #176

Open super23n opened 3 years ago

super23n commented 3 years ago

Is it possible to get the viewer count when watching the stream? I have setup the player (Clappr) to get the stream with the URL from the example:

http://example.com/dir?port=1935&app=appname&stream=streamname

When I check the nclients page, I can see the number of viewers watching the stream. The viewer count is updated instantly.

I know that I can send a GET request to the nclients page and get the number that way, but I was wondering if it's possible to do it in one request with the stream data.