First sample code

Here's a video that scales proportionally when the webpage is resized.

It's based on the same repeated solution as the one you can find here :

(more if you search for it)

Notice the letterbox appearence.

Second sample code

is a video displayed based on the code here :

Extra styling is added for appearences, but the <iframe> code from Vimeo is the same.

To make the video fit better in the frame, the height of the <iframe> and <canvas> is changed from 281px to 280px.

Notice there is no letterbox, unlike with the video above.

And unlike the video above, the width is contrained in the provided width of 500px.

All videos on this site are based on this code.

More comparison pages based on the first sample codehere (as text) and second sample codehere (as text).

And this is another simple code you can use ➠ Basic Responsive Video (raw code).

Feb 17 2021 19:41:04