1

Is there a way to use captureStream() method in ReactJS canvas? It says no function called captureStream.

I am using canvas with the reference to it. canvasRef.captureStream() is not a function obviously.

Canvas is created by;

const canvasRef = useRef<HTMLCanvasElement>(null!)

and

const stream = canvasRef.current.captureStream();

returns there is no function like captureStream() although it appears in the DOM, checkout;

https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/captureStream

sideshowbarker
  • 81,827
  • 26
  • 193
  • 197
golgetahir
  • 98
  • 1
  • 7
  • 1
    React does not modify DOM Apis. If its there without React, it will be there with it. Without code we cant help any further. – Slava Knyazev May 10 '21 at 14:04
  • Hi Slava, Thank you for your comment, I shared more information about the subject. I am sorry for the misinformation. – golgetahir May 10 '21 at 17:05

0 Answers0