element-hq / element-hq/element-call

[EXI] Call audio & video feeds stop/fail if a user joins or leaves the call while the device screen is off/locked

Open
#4,057 1 comment 0 reactions 0 assignees View on GitHub
T-Defect
Dominant language
TypeScript
Stars
996
Forks
213
Avg merge
1d 8h
Merged PRs (30d)
55

Description

### Steps to reproduce

**Issue**: When you are in an Element Call room with at least one other user and your device’s screen is off/locked, and another user joins, the audio (and video feeds, if any) stop working for you.

**Resolution**: To make them work again, you have to unlock your device, navigate to the call (at which point the state updates to show the user who joined). At this point, there is still no audio until you leave the call and rejoin.

Repro steps:
1. Start an Element call in a room with at least 2 available users.
2. User1 joins the call
3. Lock your device by pressing the Lock button OR go to the home screen and let your device auto-lock due to inactivity.
4. (at this point, you are in a call with User1 and your device’s screen is off/locked. everything is working as expected)
5. User2 joins the call
6. From your perspective, you stop hearing any audio from User1. You cannot hear User2. There was no “call join sound” to announce User2 joined. User1 and User2 cannot hear you.
7. It will stay like this until you return to the call screen, leave the call, and join again.

A workaround to prevent this from happening, which my users and I have been doing, is not locking your device’s screen, which thankfully the call screen facilitates by (likely) preventing the device from auto-locking as long as you have the call screen open. This of course is less than ideal due to battery drain, accidental presses if you are calling on an iPhone and it is in your pocket etc.

The issue can be consistently reproduced. (5/5 repro) It has been happening for a few months. Perhaps it is related to something that iOS is doing when the screen is locked?
I can provide LiveKit/JWT/EXI logs if needed.

**Other things I tried**:
I enabled MSC4354 Sticky Events on my HS in an (blind and hopeful) attempt to see if it would fix this, or make it better. With all 3 EC clients newer than v0.17.0 and Matrix 2.0 enabled in the Developer tab of EC, the behavior is unfortunately the same.
We also tried the same in Compatibility mode, and the result was the same.

### Outcome

#### What did you expect?
I expect the call to keep going without interruption when a new user joins or leaves the call.
I also expect to hear the “user joined”/“user left” announcement sounds.
#### What happened instead?
The audio stops working both ways when a new user joins or leaves the call, while your device’s screen is turned off/locked, as described above.

### Your phone model

iPhone 17 Pro Max

### Operating system version

iOS 26.5.1

### Application version

26.06.0 (231) WVCQGBWYRZ

### Homeserver

Self-hosted, closed federation HS running Synapse v1.155.0

### Will you send logs?

Yes

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the call on an iPhone with the screen locked, then inspect the call and audio handling around participant joins or leaves during the locked state. Use the provided LiveKit, JWT, and EXI logs if needed; done means audio, video, and join/leave sounds continue working in both directions without leaving and rejoining.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, typescript
Domain
audio-video-rtc, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.