How to make MP4 video width responsive

I would like to show an mp4 video on my page in a loop. I can’t use a GIF as the file size is too large

I am using this code:

The only problem is the width is not mobile responsible. And 800px is too wide on mobile and tablet.

Do you know what code I could add to set a different width on mobile / tablet / desktop?

Thank you!

Hi @DevsDoSomething,

Please try replacing width="800px" with a fluid width e.g: width="100%".

If that does not work, you can add this: instead of width="800px" put in: style="aspect-ratio: 1;"

Let us know how it goes.