I try to render canvas with full window width and height. I calculate window width and height and put them in renderVideo and canvas element. Video takes all window height but not window width. Video is square.
await mediaStream.renderVideo(videoRef.current, userId, width, height,0,0,3); <canvas width={width} height={height} ref={videoRefRef} />
Hey @reactdev
Thanks for your feedback.
The aspect ratio is 16:9 as default, so if the canvasWidth / canvasHeight is not as this ratio, there are blank spaces around the video.
canvasWidth
canvasHeight
Thanks Vic
Is there way to change aspect ration?
Hi @reactdev
Sorry there is no method to change the aspect ratio.