-
Notifications
You must be signed in to change notification settings - Fork 442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf(participants): update participants session status from signaling #12556
base: main
Are you sure you want to change the base?
Conversation
1220066
to
3cf9b0c
Compare
const updateUsersFromInternalSignaling = async ([participants]) => { | ||
const hasUnknownSessions = await store.dispatch('updateParticipantsFromInternalSignaling', { token: token.value, participants }) | ||
if (hasUnknownSessions) { | ||
debounceUpdateParticipants() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RFC: Maybe we need to update immediately here?
Should happen in two cases:
- we don't have a list yet, so we already fetching it, (then request will be cancelled);
- a new participant (guest) joined and not in the list yet (would be a disaster for webinars, where new people are joining every time)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kept as-is, so will be updated in 3-15s
- add trigger to cancel this request (if everyone was found in very first server response, but data wasn't there yet)
- OR
- Do not make an immediate request, get everyone as unknown and trigger debounce interval (will be anyway for conversation, just not provoke another one)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree to keep it as-is.
As we know from signaling message what attendees are joining, what about create a temporary participant with the info available and data will be completed once fetched ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't have enough information to show a participant from signaling until fetch. And we got all the actual info from it, there's no need to complete it later.
Though we can consider cache participants list 🤔
3cf9b0c
to
0c6efa3
Compare
const updateUsersFromInternalSignaling = async ([participants]) => { | ||
const hasUnknownSessions = await store.dispatch('updateParticipantsFromInternalSignaling', { token: token.value, participants }) | ||
if (hasUnknownSessions) { | ||
debounceUpdateParticipants() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree to keep it as-is.
As we know from signaling message what attendees are joining, what about create a temporary participant with the info available and data will be completed once fetched ?
…es from participants update Signed-off-by: Maksim Sukharev <[email protected]>
…nternal signaling Signed-off-by: Maksim Sukharev <[email protected]>
…tandalone signaling Signed-off-by: Maksim Sukharev <[email protected]>
…signaling Signed-off-by: Maksim Sukharev <[email protected]>
Signed-off-by: Maksim Sukharev <[email protected]>
[skip ci] Signed-off-by: Maksim Sukharev <[email protected]>
0c6efa3
to
53727a7
Compare
if (!attendeeUsersToUpdate[attendeeId]) { | ||
attendeeUsersToUpdate[attendeeId] = { sessionIds: [...attendee.sessionIds] } | ||
} | ||
if (participant.user.displayname) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (participant.user.displayname) { | |
if (participant.user?.displayname) { |
index.js:2 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'displayname')
const { token, attendeeId, sessionId } = session | ||
const attendee = store.getters.getParticipant(token, attendeeId) | ||
const updatedData : { sessionIds: [], inCall?: number } = { | ||
sessionIds: attendee.sessionIds.filter((id: string) => id !== sessionId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When actor leaves conversation
sessionIds: attendee.sessionIds.filter((id: string) => id !== sessionId) | |
sessionIds: attendee?.sessionIds.filter((id: string) => id !== sessionId) |
index.js:2 Uncaught TypeError: Cannot read properties of null (reading 'sessionIds')
☑️ Resolves
Important
Stores all sessions in signaling store 🍍:
If no attendee was mapped to the session, fetch participants and patch session later
Update participant object with data from signaling:
Warning
signaling-participant-list-changed
were extended to 30 seconds to reduce total amountExamples of signaling messages inside:
INTERNAL JOINED
INTERNAL LEFT (
alice
)EXTERNAL JOINED
EXTERNAL LEFT (
bob
)[ [ "Li3jtK-0B4FW3m4eJDLajKQ7asilwKlxnUzc91Mnlrt8MVFnWnJQNlFpSFRvbkwxWGxoc3NxS19JMjNwUl9fLWNVb1FTSER4eFFnaHFFbUkyZFFWNWVzVFFRMGlMX003cVdaeWNGWXhDbWxlelR0UE5pZG1iTkcwZVdkVUJoZ2o4ZDRva2I5VERNSlcycW5iazFyMnVlX3JndkJkT1FKYzI2MGpIcHV4aUlhQWRHcGVVNWxYX2NTc0ZFMExvbGNJMFRWU19rU3I2fDI4OTE4ODgxNzE=" ] ]
EXTERNAL CHANGED (
alice
joined call)EXTERNAL END CALL FOR ALL
undefined
🖌️ UI Checklist
🖼️ Screenshots / Screencasts
Screencast.from.21.06.2024.13.04.46.webm
🚧 Tasks
🏁 Checklist