Video configurations not being followed in getUserMedia()

Viewed 50

I am trying to fullscreen my camera stream, but I am running into issues with the sizing. Does getUserMedia() have a size cap?

const $size = params.VIDEO_SIZE[sizeOption];
    const videoConfig = {
      audio: false,
      video: {
        facingMode: "user",
        width: $size.width,
        height: $size.height,
        frameRate: {
          ideal: targetFPS,
        },
      },
    };

    console.log(`${videoConfig.video.width}x${videoConfig.video.height}`); //1866x1051

    const stream = await navigator.mediaDevices.getUserMedia(videoConfig);

    //stream size not following videoConfig settings
    let { width, height } = stream.getTracks()[0].getSettings();
    console.log(`${width}x${height}`); // 1280x720
0 Answers
Related