Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

feat(1080p): pass new-style constraints to createLocalTracks (#2087)

virtuacoplenny2d9ce2486e7a
diff --git a/config.js b/config.js
index 29c0dab908..228a483fbf 100644
--- a/config.js
+++ b/config.js
@@ -92,6 +92,22 @@ var config = {
// Sets the preferred resolution (height) for local video. Defaults to 720.
// resolution: 720,
+ // w3c spec-compliant video constraints to use for video capture. Currently
+ // used by browsers that return true from lib-jitsi-meet's
+ // RTCBrowserType#usesNewGumFlow. The constraints are independency from
+ // this config's resolution value. Defaults to requesting an ideal aspect
+ // ratio of 16:9 with an ideal resolution of 1080p.
+ // constraints: {
+ // video: {
+ // aspectRatio: 16 / 9,
+ // height: {
+ // ideal: 1080,
+ // max: 1080,
+ // min: 240
+ // }
+ // }
+ // },
+
// Enable / disable simulcast support.
// disableSimulcast: false,
diff --git a/react/features/base/conference/constants.js b/react/features/base/conference/constants.js
index 7b515efc6d..7e7d34c0c6 100644
--- a/react/features/base/conference/constants.js
+++ b/react/features/base/conference/constants.js
@@ -42,7 +42,7 @@ export const JITSI_CONFERENCE_URL_KEY = Symbol('url');
* @type {object}
*/
export const VIDEO_QUALITY_LEVELS = {
- HIGH: 720,
+ HIGH: 1080,
STANDARD: 360,
LOW: 180
};
diff --git a/react/features/base/tracks/functions.js b/react/features/base/tracks/functions.js
index 6e13bdcc24..add0f5b52a 100644
--- a/react/features/base/tracks/functions.js
+++ b/react/features/base/tracks/functions.js
@@ -45,6 +45,7 @@ export function createLocalTracksF(
}
const {
+ constraints,
firefox_fake_device, // eslint-disable-line camelcase
resolution
} = store.getState()['features/base/config'];
@@ -53,6 +54,7 @@ export function createLocalTracksF(
JitsiMeetJS.createLocalTracks(
{
cameraDeviceId,
+ constraints,
desktopSharingExtensionExternalInstallation:
options.desktopSharingExtensionExternalInstallation,
desktopSharingSources: options.desktopSharingSources,