loomchild / sojourner-web

FOSDEM conference companion PWA
https://sojourner.rocks
GNU Affero General Public License v3.0
50 stars 6 forks source link

Report number of people watching a stream #51

Closed loomchild closed 1 year ago

loomchild commented 3 years ago

Could be done by using heartbeat function. Passing URL of stream as param. For example every 10s, if stream is being played. I could store hash of IP as key. Then there could be periodic function that retrieves data from say last 30s, to create a record with stats per URL.

loomchild commented 3 years ago

Perhaps get the counter from associated chat room (check if guests count).

loomchild commented 3 years ago

I think the stats from room users will not be great as the user logs out after certain amount of time. - check docs, ask expert.

loomchild commented 3 years ago

Perhaps write a tool and ask FOSDEM if they'd like to share / participate.

Hash IP, add optional stats per custom ID / hash.

loomchild commented 3 years ago

Could be done with recurrently calling a function storing a user key + last seen timestamp (+event ID). Then periodic function can just query number of users per each event withing a time window (e.g. 3 minutes)