-
Couldn't load subscription status.
- Fork 21
Add device id options to connect #377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…t options Co-authored-by: zach <[email protected]>
|
Cursor Agent can help with this pull request. Just |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: zach <[email protected]>
Co-authored-by: zach <[email protected]>
Co-authored-by: zach <[email protected]>
There was a problem hiding this comment.
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 support for specifying audio input and output devices when connecting to EVI, allowing users to select specific microphones and speakers for their sessions.
Key changes:
- Introduced
DeviceOptionstype withmicrophoneDeviceIdandspeakerDeviceIdfields - Updated
connect()to accept device IDs and pass them to the audio player and microphone initialization - Added device selector UI to the example application demonstrating the new functionality
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/react/src/models/connect-options.ts | Added DeviceOptions type and included it in ConnectOptions |
| packages/react/src/lib/useSoundPlayer.ts | Modified initPlayer to accept and configure speaker device via setSinkId |
| packages/react/src/lib/VoiceProvider.tsx | Updated connect to extract device options and pass them to audio initialization |
| packages/react/README.md | Added documentation for DeviceOptions and formatting improvements |
| packages/react/MIGRATION.md | Formatting changes to markdown (bold text and list styles) |
| examples/next-app/components/ExampleComponent.tsx | Added device enumeration and selector UI to demonstrate device selection |
| README.md | Table formatting alignment fix |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (audioOutputs.length > 0 && !selectedSpeakerId) { | ||
| setSelectedSpeakerId(audioOutputs[0].deviceId); | ||
| } | ||
| } catch { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we update this to close the microphone stream once we get the device IDs?
Add
deviceIdtoAudioConstraintsandspeakerDeviceIdtoConnectOptionsto allow users to specify audio input and output devices.Slack Thread