I'm currently working with a video tag:
<video loop class="video">
<source src="..." type="video/mp4"></source>
</video>
It is tied to an intersection observer that triggers the autoplay attribute on it. When the video is not visible I want to reset it so it returns to its pristine state (showing the poster).
Currently I'm doing this:
const videoNote = document.querySelector("video")
videoNote.pause()
videoNote.load()
This works but I'm having trouble with the browser reloading my page (which may or may not is caused by the .load
method.
Is there a better way to reset a video?