Constraints ignored after update

It appears when resolution is set then everything in constraints (min/max/ideal) ignore and min/max is not even logged in console. Works as usual if resolution excluded.

1 Like

Not exactly. If resolution is provided, the whole constraints stanza seem to be ignored because:

resolution: 720,
    constraints: {
        video: {
            height: {
                ideal: 720,
                max: 720,
                min: 240
            },
            width: {
                ideal: 960, <-----
                max: 960,
                min: 320
            }
        }
    },
Got media constraints:  {"video":[ ... ]"width":{"ideal":1280} <-----
1 Like

Ok, i think the reason is this commit: fix(RTC) drop the "old gUM" flow · jitsi/lib-jitsi-meet@ad5692d · GitHub.

getConstraints() in modules/RTC/RTCUtils.js sets a preset of video constraints if resolution is provided:

        import Resolutions from '../../service/RTC/Resolutions';
        [ ... ]
        // The "resolution" option is a shortcut and takes precendence.
        if (Resolutions[options.resolution]) {
            const r = Resolutions[options.resolution];

            constraints.video = {
                height: { ideal: r.height },
                width: { ideal: r.width }
            };
        }

Resolutions are found here lib-jitsi-meet/Resolutions.js at master · jitsi/lib-jitsi-meet · GitHub.
FYI: lib-jitsi-meet/modules/RTC/RTCUtils.js at 8057f12a3990dff2cc5c67e1dc3a42e5fdbe4233 · jitsi/lib-jitsi-meet · GitHub

2 Likes