-
Notifications
You must be signed in to change notification settings - Fork 27
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
Fix: Web-3042 Resolved crash observed in switching role from VNRT to Broadcaster in MWeb #3299
base: dev
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -450,7 +450,7 @@ export class DeviceManager implements HMSDeviceManager { | |||
wired = device; | |||
} else if (deviceCategory === 'bluetooth') { | |||
bluetoothDevice = device; | |||
} else if (deviceCategory === 'speakerhone') { | |||
} else if (deviceCategory === 'earpiece') { |
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.
@eswarclynn could this typo have caused any issues?
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.
our earpiece selection logic will fail
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.
Could be remember copying this code, from AudioSinkManager
packages/roomkit-react/src/Prebuilt/components/Header/common.jsx
Outdated
Show resolved
Hide resolved
export const getAudioDeviceCategory = (deviceLabel?: string) => { | ||
if (!deviceLabel) { | ||
HMSLogger.e('[DeviceManager]:', 'No device label provided'); | ||
return 'speakerphone'; |
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.
when do we get into this scenario? when no publish permission is present like viewer roles?
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.
- In LiveStreaming Room, join as Broadcaster
- Switch role to VNRT
- Switch role back to Broadcaster, then the crash happens
const label = deviceLabel.toLowerCase(); | ||
if (label.includes('speakerphone')) { | ||
return 'speakerhone'; | ||
return 'speakerphone'; |
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.
@eswarclynn enum could have prevented this.
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.
✅
Details(context, link the issue, how was the bug fixed, what does the new feature do)