element-hq / element-hq/element-call
Video quality crashes whenever you foreground the app.
- Dominant language
- TypeScript
- Stars
- 996
- Forks
- 213
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 54
Description
### Steps to reproduce
1. Call someone
2. Switch tab
3. Switch back again
4. Notice the remote video quality recovers from awful bitrate back to normal video bitrate over a second or two.
### Outcome
#### What did you expect?
Just because you backgrounded the tab, i wouldn't expect the bitrate to collapse when you foreground again.
Apparently this is because we unsubscribe the stream from the MCU entirely, based on the logic in EC which hides streams which aren't currently visible to the user. This saves bandwidth, but cosmetically it's horrible as it recovers.
Presumably the best outcome would be to still unsubscribe (to save bandwidth), but cache the bitrate so when we resubscribe it recovers instantly.
### Operating system
_No response_
### Browser information
_No response_
### URL for webapp
_No response_
### Will you send logs?
No
Contributor guide
Research direction
Trace the EC logic that hides streams which are not currently visible, then follow the unsubscribe and resubscribe path used when switching tabs. Reproduce the call, tab switch, and bitrate recovery behavior first. Done means returning to the tab no longer causes a visible bitrate collapse while the stream can still be unsubscribed to save bandwidth.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- audio-video-rtc, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100