# html 5 video problems

**URL:** <https://community.hubspot.com/t/html-5-video-problems/69706>\
**Category:** CMS Development\
**Created:** [November 21, 2022, 10:02pm UTC](https://community.hubspot.com/t/html-5-video-problems/69706 "2022-11-21T22:02:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![franzdib](https://avatars.discourse-cdn.com/v4/letter/f/b487fb/32.png) [@franzdib](https://community.hubspot.com/u/franzdib)\
**Post date:** [November 21, 2022, 10:02pm UTC](https://community.hubspot.com/t/html-5-video-problems/69706/1 "2022-11-21T22:02:30Z")

</div>

Hi,

is there anyone that can help me to undersdand a couple of problems with my test page?

Please have a look:

[https://info.thasar.com/test](https://info.thasar.com/test)

As you see I added a video with this code:

\<video autoplay playsinline style=“pointer-events: none;” width=“100%” height=“height” loop\>  
\<source src=“[https://25775015.fs1.hubspotusercontent-eu1.net/hubfs/25775015/thasar\_motto.mp4](https://25775015.fs1.hubspotusercontent-eu1.net/hubfs/25775015/thasar_motto.mp4)” type=“video/mp4”\>  
\<source src=“[https://25775015.fs1.hubspotusercontent-eu1.net/hubfs/25775015/thasar\_motto.ogg](https://25775015.fs1.hubspotusercontent-eu1.net/hubfs/25775015/thasar_motto.ogg)” type=“video /ogg”\>  
\</video\>

I have two main problems:

1)it does not work in Explorer and Opera

2)I am not able to fix the distance between the bottom of the video and the section below it. When it resizes it moves..

By the way, this is the theme I am using;

##### Theme: Atlas by Kalungi

I really appreciate if you can help!

---

<div class="post-metadata">

**Author:** ![alyssamwilie](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/alyssamwilie/32/2072_2.png) [@alyssamwilie](https://community.hubspot.com/u/alyssamwilie)\
**Post date:** [November 22, 2022, 2:43pm UTC](https://community.hubspot.com/t/html-5-video-problems/69706/2 "2022-11-22T14:43:45Z")

</div>

1. Edge (what I’m using you mean by Explorer since Explorer is discontinued), and I’m assuming Opera as well, by default does not allow autoplay of videos in the browser settngs. I turned that setting off in my own Edge browser and the video played fine. Since we can’t control a user’s browser settings you instead would want a fallback by adding a ‘poster’ to the video, which is just an image that would show when autoplay is not available.

`<video poster="your-poster-image.jpg"></video>`

2. Instead of using a large bottom padding on the wrapper div to create the height I would use aspect-ratio (aspect-ratio: 16/4) and then use object fit on the video (object-fit: cover). (There’s also an empty \<p\> tag underneath the video adding extra space)

```lia-code-sample
<div style="max-width: 100%;margin: 0px;aspect-ratio: 16/4;">
 <video autoplay="" playsinline="" style="width: 100%;height: 100%;object-fit: cover;" loop="" width="100%" height="height">
 <source src="https://thasarvideos.s3.eu-central-1.amazonaws.com/thasar_motto.mp4" type="video/mp4" codecs="avc1.4D401E, mp4a.40.2">
 <source src="https://thasarvideos.s3.eu-central-1.amazonaws.com/thasar_motto.Ogg" type="video /ogg" codecs="theora, vorbis">
 </video>
</div>

```
