When I startVideo with a virtual background, sometimes the video aspect ratio is not 16:9. I have tried multiple times with the same options when starting the video.
When the video aspect ratio is not 16:9, I do not receive any errors when starting the video.
We analyzed the logs and confirmed that the captured aspect ratio was 4:3 instead of 16:9. The logs indicate that we attempted to capture video at a 1280x720 resolution, but it failed, causing a fallback to the default capture. This may be due to the camera not supporting the specified constraints.
Could you test it using the official WebRTC sample?
When this issue occurs, turning the camera off and then on again → the video ratio is corrected, and the issue no longer appears.
The issue occurs when rendering with Canvas. However, switching to video-player inside video-player-container → the video ratio is corrected, and the issue no longer appears
If we remove the option hd: state.mediaStream.isSupportHDVideo() → the video ratio is corrected, and the issue no longer appears. Could this be related to the warning: “HD support is currently limited and comes with several restrictions and limitations”?
Can you help us identify the root cause and suggest a solution for this?
The issue occurs when rendering with Canvas. However, switching to video-player inside video-player-container
Yes. We recommend using stream.attachVideo method instead of stream.renderVideo method in the 2.x version, as the latter one may be deprecated in the future release.
“HD support is currently limited and comes with several restrictions and limitations” ?
It is just a notification indicating that HD or Full HD video may not be effective on certain platforms or devices. We will gradually support more platforms. This notification does not affect functionality.
@vic.yang Thanks, we’ll temporarily disable the HD option to fix the ratio issue and later switch to stream.attachVideo instead of stream.renderVideo.
@vic.yang Preview also encountered this issue. We can’t set it within a 16:9 view without black edges. I converted canvas to use video-player but the issue still appear
I checked the camera resolution, and it appears that the supported formats are:
180p (320x180)
QVGA (320x240)
360p (640x360)
VGA (640x480)
However, HD (1280x720) and Full HD (1920x1080) are not supported.
On preview screen, I switched from using a canvas to a video-player, but the issue still persists. How can we resolve this? I tested with the official Zoom web client, and it seems to zoom in to fit a 16:9 view.