InterserctionObserver unobserve while holdingdown button

Job ID: 36072537

Budget: $30 – $250 USD

I have videos on a slider/swiper that automatically play and pause using an InterserctionObserver function (play when observed/pause when unobserved) and I would like to add a "button" (Fontawesome Icon) that causes the "unobserve" of the whole InterserctionObserver (i.e. the screen, pausing the video because its unobserved).

My application is for mobile devices, so i would like the screen to be unobserved when pressed/held and to observe when unpressed/released. The action of press and release is very important. The user must see the video pause when holding specified "button" and play when released.
Related categories: JavaScript jQuery