fix(meeting): pass device IDs from components and use exact media constraints#350
Open
akulakum wants to merge 1 commit into
Open
fix(meeting): pass device IDs from components and use exact media constraints#350akulakum wants to merge 1 commit into
akulakum wants to merge 1 commit into
Conversation
…straints Accept device ID from the second action() argument to match @webex/components after PR #346, use exact getUserMedia constraints for reliable device switching, and fix getStream() Observable teardown during preview device changes. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
COMPLETES #https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-824300
Vidcast demo link: https://app.vidcast.io/share/f9ab47df-fd36-4380-8879-d6f23054a3b3
This pull request addresses
Meetings Widget Settings → Audio/Video device selection stopped applying the chosen microphone, speaker, or camera after
@webex/sdk-component-adapter@1.113.0shipped with PR #346.Customer environment:
@webex/widgets^1.28.2,@webex/components1.277.1,@webex/sdk-component-adapter1.113.0, Chrome on macOS.Root cause: PR #346 refactored meeting control
action()methods to read device IDs from a context object (e.g.{ meetingID, microphoneId }). However,@webex/components@1.277.1still invokes device controls as:The device ID is passed as the second argument, not inside the context object. The adapter ignored the second argument, so
microphoneId/speakerId/cameraIdwasundefinedandswitchMicrophone()never received the selected hardware ID.Two additional issues made switching unreliable even when partially fixed:
getUserMedia({ deviceId: id })(non-exact) silently falls back to the built-in device when a preview stream is already active.{ exact: deviceId }is required for reliable switching.getStream()usednew Observable(async (subscriber) => …), causingUnsubscriptionErrorwhen stopping preview streams during rapid device changes.by making the following changes
1. Device switch controls — accept 2nd argument from
@webex/componentsFiles:
SwitchMicrophoneControl.js,SwitchSpeakerControl.js,SwitchCameraControl.jsBackward-compatible: supports PR #346 context-object shape and the two-argument call pattern used by
@webex/componentstoday.2. Exact media constraints for Chrome
File:
MeetingsSDKAdapter.js—switchMicrophone(),switchCamera()3. Fix
getStream()Observable teardownFile:
MeetingsSDKAdapter.js—getStream()clearTimeout(askingTimeout)in teardown to prevent errors during device switch4. Unit tests
action({ meetingID }, deviceId)contract on all three switch controls{ exact: deviceId }and plain'default'constraint behavior inMeetingsSDKAdapter.test.jsChange Type
The following scenarios were tested
< ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >
The GAI Coding Policy And Copyright Annotation Best Practices
Checklist before merging