Skip to content

[VID-1209] Remove deprecated stats properties. - #2116

Merged
vagruchi merged 3 commits into
mainfrom
remove-stats-v2-only
Sep 30, 2026
Merged

vagruchi merged 3 commits into
mainfrom
remove-stats-v2-only

Conversation

@vagruchi

Copy link
Copy Markdown
Contributor

No description provided.

@vagruchi
vagruchi merged commit f18aed6 into main Sep 30, 2026
5 checks passed
@vagruchi
vagruchi deleted the remove-stats-v2-only branch September 30, 2026 15:20
oliverlaz added a commit to GetStream/stream-video-js that referenced this pull request Oct 6, 2026
### 💡 Overview

Follow-up to GetStream/protocol#2116, which
removed the deprecated `SendStatsRequest` fields (`subscriber_stats`,
`publisher_stats`, `audio_devices`, `video_devices`,
`subscriber_rtc_stats`, `publisher_rtc_stats`). The client stops sending
them and drops the code that only existed to fill them.

### 📝 Implementation notes

- `signal.ts` regenerated without the removed fields.
- `SfuStatsReporter` no longer serializes raw `getStats()` reports or
observes mic/camera device lists, so it no longer needs `microphone`,
`camera` and `state` in its options.
- `StatsTracer.takeSample()` returns `PerformanceStats[]` instead of `{
performanceStats, stats }`; the `ComputedStats` type is gone.
- The reporter's device subscription used to warm the device-list cache
that device persistence reads synchronously. Without it, a camera
preference could be saved with an empty label, so
`DeviceManager.persistPreference` now falls back to the active track's
label when the device isn't in the cached list. Covered by a new
`CameraManager` test.
- Type-level note: `StreamSfuClient.sendStats()` is exported, and its
parameter type loses the removed fields.
- Smoke-tested in a two-participant browser call: `SendStats` returns
200 without the removed fields, encode/decode stats map to
publisher/subscriber, the leave flush is sent, and device preferences
keep their labels.

🎫 Ticket: https://linear.app/stream/issue/REACT-1204

📑 Docs: not needed (internal stats payload only)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Selected camera or microphone preferences can now be saved using the
active track’s device label when the device list hasn’t loaded yet.

- **Improvements**
- SFU telemetry reports delta-compressed WebRTC stats and encoding and
decoding performance metrics. Sampling and reporting now use the updated
stats flow.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants