peachananr / purejs-onepage-scroll

The javascript version of the infamous jQuery One Page Scroll without relying on jQuery.
http://peachananr.github.io/purejs-onepage-scroll/demo/purejs_onepage_scroll_demo.html
GNU General Public License v2.0
770 stars 182 forks source link

Youtube video player not working on Firefox #12

Closed raiseandfall closed 9 years ago

raiseandfall commented 9 years ago

Hi there,

When you implement a youtube video player ( with iframe ) in one of the section that is not the first one, the video player loads but there's no mouse action available ( can't be played, paused, etc... ). It only happens on firefox. Here's a quick example from the demo page : http://raiseandfall.github.io/purejs-onepage-scroll/demo/purejs_onepage_scroll_demo.html

I already checked for a pointer-events issue, a overlay issue,... without luck. I also tried to add the video dynamically in the beforeMove function, with the same result. FYI, a video in the first section ( first one showed ) works.

raiseandfall commented 9 years ago

Turned out it was pretty easy: you just need to add a translate(0, 0) to the iframes / video player containers :

iframe {
  transform: translate(0, 0);
}

Demo here : http://raiseandfall.github.io/purejs-onepage-scroll/demo/purejs_onepage_scroll_demo.html