Scroll Down to Start Playing Video in HTML and JavaScript
Show Notes
It’s gotta be fairly easy to play an HTML video when you scroll down to it, right? We kinda knew IntersectionObserver is the right API here, for performance reasons, but this use case is super well served by it and it’s quite easy to use. We also handle the prefers-reduced-motion case here.