About Video streaming blob

now, I receive a video stream and display it via video

clipboard.png

if the video stream is sent from a mobile phone, it is vertical, but if it is sent by a tablet, it is a rectangular

.

excuse me, how to control the size of this display?

is there any way to do dimensional processing on this stream?

Mar.28,2021

should not directly deal with the video stream size. The general method is to wrap a parent div, parent div around the video tag, and then, as needed, the width (or height) of the fixed video tag is 100% of the parent div width (or height), and then another attribute is adapted (mainly to prevent video distortion). For example, if you want different sizes of videos to be displayed with the same width, Then set the width to 100% of the parent div width, which is highly adaptive. If you want the height of videos of different sizes to be the same, set the height to 100% of the height of the parent div, and the width is adaptive; and for beauty, the video tag should be centered horizontally and vertically in the parent div.

Menu