简体   繁体   中英

Force popup window ratio on resize

I know there maybe ugly hacks to achieve this, which is why I am asking this. Basically I have a video chat window, so I want to allow resizing of window, but I would like to force the ratio (so that it is maintained). I guess I can run a javascript which refreshes every X seconds and resizes the window.

Any good ideas? I don't mind if the hacks work on certain browsers and not on others. As many as possible.

I fear that you'll end up with the JavaScript fighting the OS during the resize operation.

How about putting the video into a DIV and use JavaScript to give that a certain aspect ration depending on the window size plus maybe a button "fit window to content" to get rid of the border?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM