How many people are watching?
Aphris-Karu opened this issue · 5 comments
Would be nice to have a counter or a stats page that displays how many people are currently watching the stream.
Type /stats
in chat.
I do want to get a live count under or on top of the video eventually. I'll probably get atound to that when I rework some of the video specific stuff.
Taking a look at /stats shows how many are in chat but how many were watching?
Looking at my HAProxy that handles the reverse proxy into my cloud it looks like there were 24 sessions and only 7 people in chat.
We did a Co-Vid movie night for the family last night and the MovieNight server (Running in a Docker Swarm) worked perfectly! Thank you for the great Server.
Getting accurate viewer counts is going to be very tough. Twitch has trouble with this, and they're backed by Amazon.
Currently, the number is simply the number of connected chat clients. Each client will make two connections to the server. One for the video feed and one one websocket connection for the chat (and probably some additional sessions for standard HTTP downloads for emotes and the HTML). This is probably why you are seeing more connections in HAProxy than are reported with the /stats
command.
Ok I have spent a few days thinking about this. The more I thought about it the more I realized just how hard it would be to implement.
That is an interesting problem and one that I do not see a good solution to.
Yea, it's not an easy fix. The number of users in chat is usually "good enough" for my purposes.