title: Property 'captureStream' does not exist on type 'HTMLVideoElement'
body: <p>I'm making a simple project that uses WebRTC in React with typescript.</p>
  <p>I was following <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/captureStream" rel="nofollow noreferrer">MDN HTMLMediaElement.captureStream()</a>.</p>
  <pre class="lang-js prettyprint-override"><code>const vid: HTMLVideoElement | null = document.querySelector(&quot;video&quot;);
  if (vid) {
     vid.captureStream();
  }
  
  .
  .
  .
  
  &lt;video id=&quot;myVid&quot;&gt;&lt;/video&gt;
  </code></pre>
  <p>But I'm getting this error,</p>
  <pre><code>Property 'captureStream' does not exist on type 'HTMLVideoElement'.ts(2339)
  </code></pre>
  <p>I've even tried,</p>
  <pre><code>const vid: HTMLMediaElement | null = document.querySelector(&quot;video&quot;);
  </code></pre>
  <p>What am I doing wrong??</p>
  <h2>Edit</h2>
  <p>I tried</p>
  <pre><code>const videoCont = useRef&lt;HTMLVideoElement&gt;(null);
  
  var URL = window.URL || window.webkitURL
  const fileURL = URL.createObjectURL(e)
  if (videoCont.current) {
           videoCont.current.src = fileURL;
           videoCont.current.play = async () =&gt; {
                const mediaStream = videoCont.current?.captureStream();
         }
     }
  </code></pre>
  <p>Still the same error,</p>
  <pre><code>Property 'captureStream' does not exist on type 'HTMLVideoElement'.
  </code></pre>
  <h2>Edit 2</h2>
  <p>I looked into <a href="https://stackoverflow.com/questions/50651091/unresolved-method-capturestream-on-htmlcanvaselement">unresolved method captureStream on HTMLCanvasElement</a>.</p>
  <p>Apparently this is still an experimental feature not supported on all browsers. Will have to wait.</p>