diff --git a/ts/RemoteConfig.ts b/ts/RemoteConfig.ts index b531948e6c..25ece15e43 100644 --- a/ts/RemoteConfig.ts +++ b/ts/RemoteConfig.ts @@ -17,7 +17,7 @@ import { getCountryCode } from './types/PhoneNumber'; export type ConfigKeyType = | 'cds.disableCompatibilityMode' | 'desktop.announcementGroup' - | 'desktop.calling.audioLevelForSpeaking' + | 'desktop.calling.sendScreenShare1800' | 'desktop.cdsi.returnAcisWithoutUaks' | 'desktop.clientExpiration' | 'desktop.editMessageSend' diff --git a/ts/services/calling.ts b/ts/services/calling.ts index 43ad3b4ee0..d67023a22c 100644 --- a/ts/services/calling.ts +++ b/ts/services/calling.ts @@ -40,6 +40,7 @@ import { import { uniqBy, noop } from 'lodash'; import Long from 'long'; +import * as RemoteConfig from '../RemoteConfig'; import type { ActionsType as CallingReduxActionsType, GroupCallParticipantInfoType, @@ -1399,13 +1400,20 @@ export class CallingClass { this.videoCapturer.disable(); if (source) { this.hadLocalVideoBeforePresenting = hasLocalVideo; - this.videoCapturer.enableCaptureAndSend(call, { + const options = { // 15fps is much nicer but takes up a lot more CPU. maxFramerate: 5, maxHeight: 1080, maxWidth: 1920, screenShareSourceId: source.id, - }); + }; + + if (RemoteConfig.isEnabled('desktop.calling.sendScreenShare1800')) { + options.maxWidth = 2880; + options.maxHeight = 1800; + } + + this.videoCapturer.enableCaptureAndSend(call, options); this.setOutgoingVideo(conversationId, true); } else { this.setOutgoingVideo(