This has been developed before Vertical Streaming was implemented
After the Vertical Streaming released, it was tested without any issues.
Calculation Explanation
The height (CH) and width (CW) of the browser.
If CH > CW, the following calculations 3 to 5 will be carried out.
Find RVH = Calculate the maximum height of the video based on the aspect ratio of CW and the video length (which is the height of the video when stretched to the widest based on the aspect ratio).
If there is space below after deducting RVH from CH, it will check if it meets the minimum bottom position size (default is 20% CH).
If there is enough space, it will switch to single-column display.