-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Description
What happened?
While working on the connection-indicator feature, I found an unresolved FIXME in:
react/features/connection-indicator/statsEmitter.ts
Inside the _onStatsUpdated function, stats received from lib-jitsi-meet (such as framerate, resolution, and codec) are structured as maps keyed by user IDs.
However, the frontend consumers in Jitsi Meet expect these values to be primitive values (per user) rather than maps.
To handle this mismatch, the current implementation performs an inline transformation, extracting the local user’s values and overriding the original stats object:
// FIXME resolution and framerate are maps keyed off of user ids with
// stat values. Receivers of stats expect resolution and framerate to
// be primitives, not maps, so here we override the 'lib-jitsi-meet' stats objects.
This change does not introduce a visible UI difference but improves the internal consistency and maintainability of stats handling.
🚨 Problem
- Introduces technical debt
- Mutates/transforms data mid-flow
- Creates implicit coupling between lib-jitsi-meet and frontend expectations
- Makes the data flow harder to understand and maintain
Platform
- Chrome (or Chromium based)
- Firefox
- Safari
- Other desktop browser
- Android browser
- iOS browser
- Electron app
- Android mobile app
- iOS mobile app
- Custom app using a mobile SDK
Browser / app / sdk version
Latest stable versions of Chrome and Firefox; issue observed in current Jitsi Meet master build.
Relevant log output
Reproducibility
- The problem is reproducible on meet.jit.si
More details?
No response