Currently, I am encountering an issue while making a webrtc video call between a mobile device in portrait mode and a laptop. The streams from the mobile and the laptop have different aspect ratios, causing challenges when trying to display the video fullscreen.
To address this problem, I implemented the following CSS:
position:fixed;
left:0;
top:0;
right:0;
bottom:0;
object-fit:contain;
object-position:50% 50%;
minHeight:100%;
minWidth:100%;
height:100%;
width:100%;
While this CSS makes the video fullscreen, it only displays the top portion of the stream with the remaining parts cut off. My question is, Is there a way through JavaScript or additional CSS to adjust the video display so that it shows the center portion of the stream and cuts out the edges? The desired effect can be seen in the reference app Apprtc.
Thank you.