docs: async function setupCamera(cameraLabel) {
    if (!navigator.mediaDevices || !navigator.mediaDevices.getUserMedia) {
      throw new Error(
          'Browser API navigator.mediaDevices.getUserMedia not available');
    }
  
    const videoElement = document.getElementById('video');
  
    stopExistingVideoCapture();
  
    const videoConstraints = await getConstraints(cameraLabel);
  
    const stream = await navigator.mediaDevices.getUserMedia(
        {'audio': false, 'video': videoConstraints});
    videoElement.srcObject = stream;
  
    return new Promise((resolve) => {
      videoElement.onloadedmetadata = () => {
        videoElement.width = videoElement.videoWidth;
        videoElement.height = videoElement.videoHeight;
        resolve(videoElement);
      };
    });
  }