Closed jinglinwishlife closed 4 years ago
You should always call ctx.drawImage
in requestAnimationFrame
or setInterval
to trigger the video encoder to produce frames.
Pass a framerate param to canvas.captureStream()
, just like canvas.captureStream(30)
I'm trying to create a MediaStreamTrack from a Canvas element then publish it to a video call. local video track is playing correctly, but other users could not receive the video track. captureStream() from video element works fine though.
Code: