amazon-chime-sdk-js
amazon-chime-sdk-js copied to clipboard
How to detect the first attendee join the meeting.
What happened and what did you expect to happen?
Hi,
I want to set a host person who join the meeting first, but I'm not sure how to determine who is the first attendee join the meeting.
Hope you can help.
Thanks,
Have you reviewed our existing documentation?
Reproduction steps
we have the hook useRoster() to return all attendees in the meeting session but it's not enough information to detect which is the first one join the meeting.
Amazon Chime SDK for JavaScript version
3.6.0
What browsers are you seeing the problem on?
Chrome MacOS
Browser version
Version 103.0.5060.134 (Official Build) (x86_64)
Meeting and Attendee ID Information.
No response
Browser console logs
None
From JS SDK side, there is no standard way of knowing who joined first. You can use the realtimeSubscribeToAttendeeIdPresence
and check the order of the attendees.
From my testing the realtimeSubscribeToAttendeeIdPresence
update for an attendee comes like this:
Scenario
- Attendee venky1 joins a meeting (Meeting A) as first attendee.
- Attendee venky2 joins the same meeting as second attendee.
- Then later venky3 joins as third attendee.
The Attendee venky3 receives three updates like below:
[DEMO] <venky3 AttendeeId> present = true (19dcc9cc#venky3) <-- Self, but third attendee
(index):2 [DEMO] <venky1 AttendeeId> = true (b03536dc#venky1) <-- First attendee
(index):2 [DEMO] <venky2 AttendeeId> present = true (dfa815ea#venky2) <-- Second attendee
You can use the pattern and see whether this satisfies your use case.
A better way is to use server side meeting event notifications:
- https://docs.aws.amazon.com/chime-sdk/latest/dg/mtgs-sdk-notifications.html
- https://docs.aws.amazon.com/chime-sdk/latest/dg/using-events.html
Please let us know if you have further questions.
Closing this issue, feel free to re-open if you still face this issue or need more information about it.