Skip to content

Commit

Permalink
Re-wire up send codec from additional options menu (aws#2361)
Browse files Browse the repository at this point in the history
* Re-wire up send codec from additional options menu

* Update meetingV2.ts

Co-authored-by: Trung Le <[email protected]>
  • Loading branch information
hensmi-amazon and ltrung authored Jul 13, 2022
1 parent de42a88 commit 62e6700
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
15 changes: 15 additions & 0 deletions demos/browser/app/meetingV2/meetingV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3570,6 +3570,21 @@ export class DemoMeetingApp
break;
}

const chosenVideoSendCodec = (document.getElementById('videoCodecSelect') as HTMLSelectElement).value;
switch (chosenVideoSendCodec) {
case 'vp8':
this.videoCodecPreferences = [VideoCodecCapability.vp8()];
break;
case 'h264ConstrainedBaselineProfile':
// If `h264ConstrainedBaselineProfile` is explicitly selected, include VP8 as fallback
this.videoCodecPreferences = [VideoCodecCapability.h264ConstrainedBaselineProfile(), VideoCodecCapability.vp8()];
break;
default:
// If left on 'Meeting Default', use the existing behavior when `setVideoCodecSendPreferences` is not called
// which should be equivalent to `this.videoCodecPreferences = [VideoCodecCapability.h264ConstrainedBaselineProfile()]`
break;
}

AsyncScheduler.nextTick(
async (): Promise<void> => {
let chimeMeetingId: string = '';
Expand Down
4 changes: 2 additions & 2 deletions demos/browser/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 62e6700

Please sign in to comment.