title: CanvasCaptureMediaStream / MediaRecorder Frame Synchronization
body: <p>When using <a href="https://developer.mozilla.org/en-US/docs/Web/API/CanvasCaptureMediaStream" rel="noreferrer">CanvasCaptureMediaStream</a> and MediaRecorder, is there a way to get an event on each frame?</p>
  
  <p>What I need is not unlike <a href="https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame" rel="noreferrer"><code>requestAnimationFrame()</code></a>, but I need it for the CanvasCaptureMediaStream (and/or the MediaRecorder) and not the window.  The MediaRecorder could be running at a different frame rate than the window (possibly at a not regularly divisible rate, such as 25 FPS vs 60 FPS), so I want to update the canvas at its frame rate rather than the window's.</p>