0

I want to capture a local video, MediaStream object from a react video component and pass it into WebRTC. captureStream() method is not present in React may be, can someone share me the code of this???

when i try to run captureStream() in react it shows me error that (captureStream is not present in reactjs)

1 Answers1

1
 <video ref={videoElementRef} muted id="video-element-ids" className="video" /> 

const url = URL.createObjectURL(file);
 this.videoElementRef.current.src = url;
 await this.videoElementRef.current.play();
 const mediaSream = this.videoElementRef.current.captureStream();
Minal
  • 183
  • 1
  • 1
  • 11