At the top of my page, there's a HTML5 video banner with the autoplay
and loop
attributes. However, when I start scrolling down, the video stops and doesn't resume when I scroll back up. I want the video to keep playing regardless of the user's scrolling actions.
I've checked the W3C spec but couldn't find any solution in the listed attributes. Is there an alternative method to disable this functionality?
The HTML and CSS are straightforward, so I'm considering using JavaScript to resolve this issue:
HTML:
<video preload="none" autoplay loop>
<source src="/media/test.mp4" type="video/mp4">
</video>
CSS:
video {
width: 100%;
height: auto;
}
Any guidance on this problem would be greatly appreciated.