baker
baker copied to clipboard
How to disable media autoplay in "three-card" mode? If it not current page.
Hi, Many user don't want to wait loading page in "-baker-page-screenshots" mode. I decided to use "three-card". But the problem is that the video plays automatically. It's important and I need to use it.

Just create a javascript that listen to window.focus and window.blur so you can trigger the video when it gets visible. :)
here's a coffescript snippet that works for me, with #html5-video being the ID of the embedded video:
window.addEventListener "blur", (-> $("#html5-video")[0].pause() ), true
Oh that work. Thanks
You're welcome. :)