Loading & Participating in MP4 when centered in viewport

I posted this previous 7 days and a pair folks pointed out the intersection observer API. I have truthful knowledge of CSS, HTMl, and JS and figured with ChatGPT I could possibly be capable to pull this off.

Basically- I am working with a plugin to screen posts (written content views plugin). The posts are loaded using AJAX. When the person is scrolling and the featured impression is centered on the monitor I want a MP4 to load and play. *this is a common feature a lot of online video streaming internet websites have*

I attempted applying the observer API to improve the showcased picture to an MP4 with a URL for the online video which is taken from a meta area of the write-up. I created a dozen attempts with different methods in 6 hours and inevitably gave up.

My guesses: *AJAX* Idk how AJAX works but just after reading a little documentation it appears like this may possibly be the issue. I also believe it really is *The plugin by itself*.

I could not discover any plugins that do this for listing blog posts and I would fork out money for this feature.