Voice-Call-for-Mobile-Gaming
Voice-Call-for-Mobile-Gaming copied to clipboard
Proper way to get call duration
How to calculate call duration for each user joined in a room ? Is there any api available for this call duration ? (call search ?) How can I get a callback when a room is closed. Is webhook available for room closed event?
Yes, you can get the call duration in the callback named OnLeaveChannel, the parameter named rtcStats contain the duration of the call.
There is no callback of channel is closed. When you leave channel, you can get a callback named OnLeaveChannel, If you joinChannel, you can get a callback named OnJoinChannelSuccess.
I do not know what is the webhook you mean. Can you explain it ?
It's like getting a callback(from Agora) to our backend(Node) mentioning that a channel(with details - users list & duration) has been closed
I have one more query, Is there an API to get the channel total duration along with the list of users(Not the last 10 users, entire users) who participated with their corresponding duration. If there is one, please mention API;
It's like getting a callback(from Agora) to our backend(Node) mentioning that a channel(with details - users list & duration) has been closed
Sorry, we don't have this callback. We do not have close channel this concept. You can join any channel and you can join Channel Success.
https://docs.agora.io/cn/rtc/restfulapi/#/%E6%9F%A5%E8%AF%A2%E9%A1%B9%E7%9B%AE%E7%94%A8%E9%87%8F/getProjectUsagesV3 You can get the userList of a channel by restful, but can't get a channel duration.