title: Navigator.getUserMedia() deprecated. How to change to MediaDevices.getUserMedia()
body: <p>Hey im trying to build a face-ai in browser. Everything works fine on my laptop but when I try to run it on a raspberry Pi it says navigator.getUserMedia() is deprecated. I know there is a new method called MediaDevices.getUserMedia but I don't have any idea how to implement it.</p>
  
  <p><strong>Code</strong></p>
  
  <pre><code>const video = document.getElementById('video')
  
  Promise.all([
    faceapi.nets.tinyFaceDetector.loadFromUri('/models'),
    faceapi.nets.faceLandmark68Net.loadFromUri('/models'),
    faceapi.nets.faceRecognitionNet.loadFromUri('/models'),
    faceapi.nets.faceExpressionNet.loadFromUri('/models'),
  ]).then(startVideo)
  
  function startVideo() {
    navigator.getUserMedia(
      { video: {} },
      stream =&gt; video.srcObject = stream,
      err =&gt; console.error(err)
    )
  }
  </code></pre>