Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #744 from SuperViz/fix/3d-participant-update
Browse files Browse the repository at this point in the history
fix: update the 3D participant when the slot changes
  • Loading branch information
carlossantos74 authored Aug 13, 2024
2 parents c29c19c + 4c7aaa2 commit 6d7c7a5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/services/presence-3d-manager/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export class Presence3DManager {
if (this.localParticipant) {
if (
this.localParticipant.name !== participant.name ||
this.localParticipant.avatar?.model3DUrl !== participant.avatar?.model3DUrl
this.localParticipant.avatar?.model3DUrl !== participant.avatar?.model3DUrl ||
this.localParticipant.slot !== participant.slot
) {
this.unthrottledUpdatePresence3D({ ...participant });
}
Expand All @@ -50,7 +51,7 @@ export class Presence3DManager {
};

private onLocalParticipantJoined = (participant: Participant): void => {
if (!participant.slot) {
if (!participant.slot || participant.slot?.index === null) {
setTimeout(() => {
this.onLocalParticipantJoined(this.localParticipant);
}, 2000);
Expand Down

0 comments on commit 6d7c7a5

Please sign in to comment.