Skip to content

fix: trace available devices and thermal state changes - #1866

Merged
oliverlaz merged 4 commits into
mainfrom
trace-devices
Jul 25, 2025
Merged

fix: trace available devices and thermal state changes#1866
oliverlaz merged 4 commits into
mainfrom
trace-devices

Conversation

@oliverlaz

Copy link
Copy Markdown
Member

💡 Overview

Adds the list of available devices to the trace log.

@oliverlaz
oliverlaz requested review from Copilot and myandrienko July 24, 2025 15:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds device enumeration tracing functionality to track available media devices in trace logs. The implementation uses a new traceOnce mechanism to log device information without duplicating entries, and resets the trace when device changes are detected.

  • Implements traceOnce functionality in the Tracer class to log device enumeration only once per key
  • Modifies the lazy helper to support parameterized factory functions for passing tracer instances
  • Integrates device enumeration tracing into audio, video, and speaker device managers

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/client/src/stats/rtc/types.ts Adds TraceKey type for categorizing trace operations
packages/client/src/stats/rtc/Tracer.ts Implements traceOnce and resetTrace methods for controlled logging
packages/client/src/helpers/lazy.ts Enhances lazy function to accept factory functions with parameters
packages/client/src/devices/devices.ts Adds tracer parameter to device enumeration functions and implements tracing
packages/client/src/devices/SpeakerManager.ts Passes tracer instance to audio output device enumeration
packages/client/src/devices/MicrophoneManager.ts Passes tracer instance to audio device enumeration
packages/client/src/devices/CameraManager.ts Passes tracer instance to video device enumeration

Comment thread packages/client/src/devices/devices.ts Outdated
Comment thread packages/client/src/devices/devices.ts Outdated
Comment thread packages/client/src/devices/devices.ts Outdated
Comment thread packages/client/src/devices/devices.ts Outdated
@oliverlaz oliverlaz changed the title fix: trace available devices fix: trace available devices and thermal state changes Jul 24, 2025
@oliverlaz
oliverlaz merged commit d8312b5 into main Jul 25, 2025
16 of 17 checks passed
@oliverlaz
oliverlaz deleted the trace-devices branch July 25, 2025 07:22
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.

4 participants