Skip to content

Commit

Permalink
Properly wrap 'setSinkId' in try/catch to fix firefox integ. test fai…
Browse files Browse the repository at this point in the history
…lures (#2852)
  • Loading branch information
hensmi-amazon authored Mar 5, 2024
1 parent 871309c commit 31d9c39
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions demos/browser/app/meetingV2/meetingV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3009,8 +3009,12 @@ export class DemoMeetingApp
// Set it for the content share stream if we can.
const videoElem = document.getElementById('content-share-video') as HTMLVideoElement;
if (this.defaultBrowserBehavior.supportsSetSinkId()) {
// @ts-ignore
videoElem.setSinkId(device);
try {
// @ts-ignore
await videoElem.setSinkId(device);
} catch (e) {
this.log('Failed to set audio output', e);
}
}

await this.audioVideo.chooseAudioOutput(device);
Expand Down

0 comments on commit 31d9c39

Please sign in to comment.