I've embedded some Youtube videos in some of my content, which seem to work well. However, when you swipe horizontally, the video does not stop playing and can be heard while reading the next article.
is there something in the API that will tell me when the users are leaving the article so i can fire the js to stop the video?
thank you for your time!
I used to use document.hasFocus() in the past to do this. However, this no longer works. Not only that, but it's broken differently on each platform.
Here's a post from a few days ago where I'm asking about it:
document.hasFocus() behavior inconsistencies