reactdev
(kod)
January 12, 2022, 11:42am
1
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} />
1 Like
vic.yang
(Vic)
January 13, 2022, 2:50am
2
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.
Thanks
Vic
reactdev
(kod)
January 13, 2022, 9:29am
3
Is there way to change aspect ration?
vic.yang
(Vic)
January 14, 2022, 2:25am
4
Hi @reactdev
Sorry there is no method to change the aspect ratio.
Thanks
Vic
system
(system)
Closed
February 13, 2022, 12:25pm
5
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.