Skip to content

Confusion about whether your media is remote or local after an unclean disconnect #3609

@robintown

Description

@robintown

Steps to reproduce

  1. Configure delayed_leave_event_delay_ms to a sufficiently large value like 90000 (so that you will be able to observe the confused app state for more than a couple seconds)
  2. Join a call
  3. Disconnect uncleanly by e.g. disabling your network connection
  4. Rejoin the call

Outcome

What did you expect?

I should now see my own user media in the call interface once again, and the app should know that this is local user media.

What happened instead?

I see my own user media in the call interface, but the app thinks it is a remote media item. This causes a number of things:

  • The video is not horizontally mirrored
  • Opening the context menu presents local volume & local mute controls, which do nothing
  • In the console there are error messages coming from the line where we try to set the local volume, because the participant object is actually a LocalParticipant, which does not have this setVolume method
  • Probably other stuff relating to PiP and one-on-one layouts being broken

This heals itself as soon as the delayed event from the previous session is sent and the membership manager sends a new membership.

The root cause is this condition in the UserMedia class, according to which a faulty cast of participant$ will be made if the participant would be local but is initially undefined.

To fix this, we should remove the need for casting by properly splitting MatrixLivekitMember into two different LocalMatrixLivekitMember and RemoteMatrixLivekitMember types.

Operating system

No response

Browser information

No response

URL for webapp

No response

Will you send logs?

No

Metadata

Metadata

Assignees

Labels

O-OccasionalAffects or can be seen by some users regularly or most users rarelyS-MinorImpairs non-critical functionality or suitable workarounds existT-DefectSomething isn't working: bugs, crashes, hangs, vulnerabilities, or other reported problemsX-Regression

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions