Youtube videos continue to play after swiping to a new article

Avatar

Avatar

royh70849153

Avatar

royh70849153

royh70849153

28-01-2016

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!

r

View Entire Topic

Avatar

Avatar

jerwarren

Avatar

jerwarren

jerwarren

28-01-2016

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