Skip to content
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

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

ygit
Copy link
Member

@ygit ygit commented Oct 3, 2024

Details(context, link the issue, how was the bug fixed, what does the new feature do)

  1. Corrected typo in device label
  2. Added checks for the currently selected audio output
  3. Corrected check for device categories

Copy link

vercel bot commented Oct 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dashboard-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 5, 2024 7:40am
storybook-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 5, 2024 7:40am

@@ -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') {
Copy link
Collaborator

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?

Copy link
Collaborator

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

Copy link
Member

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

export const getAudioDeviceCategory = (deviceLabel?: string) => {
if (!deviceLabel) {
HMSLogger.e('[DeviceManager]:', 'No device label provided');
return 'speakerphone';
Copy link
Collaborator

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

  1. In LiveStreaming Room, join as Broadcaster
  2. Switch role to VNRT
  3. Switch role back to Broadcaster, then the crash happens

const label = deviceLabel.toLowerCase();
if (label.includes('speakerphone')) {
return 'speakerhone';
return 'speakerphone';
Copy link
Collaborator

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.

Copy link
Member

Choose a reason for hiding this comment

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

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.

3 participants