From 52502880891b73907d0a6461af2152aa61dea030 Mon Sep 17 00:00:00 2001 From: Jaya Allamsetty <54324652+jallamsetty1@users.noreply.github.com> Date: Wed, 28 Jun 2023 16:40:28 -0400 Subject: [PATCH] fix(config): Remove the deprecated configs. Add the new codec selection settings for desktop and mobile endpoints. --- config.js | 35 ++++++------------- react/features/base/config/configType.ts | 9 +++-- react/features/base/config/configWhitelist.ts | 1 - 3 files changed, 15 insertions(+), 30 deletions(-) diff --git a/config.js b/config.js index 24a0cb531f9de..05c618df8f913 100644 --- a/config.js +++ b/config.js @@ -427,25 +427,12 @@ var config = { // Specify the settings for video quality optimizations on the client. // videoQuality: { - // // Provides a way to prevent a video codec from being negotiated on the JVB connection. The codec specified - // // here will be removed from the list of codecs present in the SDP answer generated by the client. If the - // // same codec is specified for both the disabled and preferred option, the disable settings will prevail. - // // Note that 'VP8' cannot be disabled since it's a mandatory codec, the setting will be ignored in this case. - // disabledCodec: 'H264', + // // Provides a way to set the codec preference on mobile devices, both on RN and mobile browser based + // // endpoints. + // mobileCodecPreferenceOrder: [ 'VP8', 'VP9' ], // - // // Provides a way to set a preferred video codec for the JVB connection. If 'H264' is specified here, - // // simulcast will be automatically disabled since JVB doesn't support H264 simulcast yet. This will only - // // rearrange the the preference order of the codecs in the SDP answer generated by the browser only if the - // // preferred codec specified here is present. Please ensure that the JVB offers the specified codec for this - // // to take effect. - // preferredCodec: 'VP8', - // - // // Provides a way to enforce the preferred codec for the conference even when the conference has endpoints - // // that do not support the preferred codec. For example, older versions of Safari do not support VP9 yet. - // // This will result in Safari not being able to decode video from endpoints sending VP9 video. - // // When set to false, the conference falls back to VP8 whenever there is an endpoint that doesn't support the - // // preferred codec and goes back to the preferred codec when that endpoint leaves. - // enforcePreferredCodec: false, + // // Provides a way to set the codec preference on desktop based endpoints. + // codecPreferenceOrder: [ 'VP9', 'VP8' ], // // // Provides a way to configure the maximum bitrates that will be enforced on the simulcast streams for // // video tracks. The keys in the object represent the type of the stream (LD, SD or HD) and the values @@ -935,12 +922,12 @@ var config = { // If not set, the effective value is 'all'. // iceTransportPolicy: 'all', - // Provides a way to set the video codec preference on the p2p connection. Acceptable - // codec values are 'VP8', 'VP9' and 'H264'. - // preferredCodec: 'H264', - - // Provides a way to prevent a video codec from being negotiated on the p2p connection. - // disabledCodec: '', + // Provides a way to set the codec preference on mobile devices, both on RN and mobile browser based + // endpoints. + // mobileCodecPreferenceOrder: [ 'VP8', 'VP9' ], + // + // Provides a way to set the codec preference on desktop based endpoints. + // codecPreferenceOrder: [ 'VP9', 'VP8' ], // How long we're going to wait, before going back to P2P after the 3rd // participant has left the conference (to filter out page reload). diff --git a/react/features/base/config/configType.ts b/react/features/base/config/configType.ts index a99b9421a76b6..db13a9660cac9 100644 --- a/react/features/base/config/configType.ts +++ b/react/features/base/config/configType.ts @@ -441,10 +441,10 @@ export interface IConfig { opusMaxAverageBitrate?: number; p2p?: { backToP2PDelay?: number; - disabledCodec?: string; + codecPreferenceOrder?: Array, enabled?: boolean; iceTransportPolicy?: string; - preferredCodec?: string; + mobileCodecPreferenceOrder?: Array, stunServers?: Array<{ urls: string; }>; }; participantsPane?: { @@ -545,8 +545,7 @@ export interface IConfig { useHostPageLocalStorage?: boolean; useTurnUdp?: boolean; videoQuality?: { - disabledCodec?: string; - enforcePreferredCodec?: boolean; + codecPreferenceOrder?: Array, maxBitratesVideo?: { [key: string]: { high?: number; @@ -557,8 +556,8 @@ export interface IConfig { minHeightForQualityLvl?: { [key: number]: string; }; + mobileCodecPreferenceOrder?: Array, persist?: boolean; - preferredCodec?: string; }; webhookProxyUrl?: string; webrtcIceTcpDisable?: boolean; diff --git a/react/features/base/config/configWhitelist.ts b/react/features/base/config/configWhitelist.ts index e2d4960a0ed48..39d108afb22b9 100644 --- a/react/features/base/config/configWhitelist.ts +++ b/react/features/base/config/configWhitelist.ts @@ -195,7 +195,6 @@ export default [ 'p2p', 'participantsPane', 'pcStatsInterval', - 'preferredCodec', 'prejoinConfig', 'prejoinPageEnabled', 'recordingService',