Webhooks feature request (/Presence enhancement) V2
Hi Daily Team!
Let me start by saying working with your API has been a delightful experience. I made a feature request a few months back regarding server-side webbooks, but couldn't follow it up because my day job got busy.
I love that you have implemented a /presence endpoint, it is a step in the right direction, but unfortunately, polling that endpoint every 15 seconds for all of my audio rooms is not scalable on either the front end side or the back end side.
What I would Ideally like is to implement an endpoint that has the following spec:
hook endpoint: myapi.myproject.com
Received data object: (basically the exact same as the /presence response body, maybe include some more fields in the future like isCameraOn, isScreenShareOn ,isMuted for each participant in the future?).
When will Daily.co call my webhook?
Whenever a participant joins or leaves(regardless of reason), and I can overwrite the list of participants. That way it's more scalable and I can mirror my database to be the same as the participants daily.co backend.
Here is a demo(the project has already stealth launched so I'm okay with sharing it 😉)
What you can see in the demo is a hacky solution where I detect the front-end client has left the room when the client sends an API request so I can update my DB and display to all other users that the room is empty, but what I need is for Daily to send the latest info regarding a room that a user has left, and I can update accordingly. That way, my BE and daily are fully in sync, and in real time.
Best Regards <3