flim Posted October 27, 2021 Share Posted October 27, 2021 I saw some websites with smooth scroll video position control like Apple and Samsung, I tried to control the video but the result is very choppy, tried different size of video but the result is not desire. Any suggestion? See the Pen XWaRBZY by fredericklim (@fredericklim) on CodePen Link to comment Share on other sites More sharing options...
romain.gr Posted October 27, 2021 Share Posted October 27, 2021 Hi flim, I've been trying a similar stuff, and indeed it's choppy, it also depends on the browser used but still, it's an issue. I had a look at Apple websites, and they actually don't use videos that much (at least not for video control on scroll), but usually they use multiples images coupling with <canvas> for performance. if you open the dev tool, under network tab, you can the sequence is chopped into single images. So you can either animate a sprite image or multiple images using stepped Easing https://greensock.com/docs/v2/Easing : here is a codepen example : See the Pen mdVEpKK?editors=0010 by GreenSock (@GreenSock) on CodePen Easy to understand the principle. and here is an example with the <canvas>: See the Pen ZEbGzyv?editors=0010 by j-v-w (@j-v-w) on CodePen and my version (choppy as well). See the Pen yLoJWpE by romaingranai (@romaingranai) on CodePen You can find informations on the forum about that , here: and there : Hope it helps! 4 1 Link to comment Share on other sites More sharing options...
GreenSock Posted October 27, 2021 Share Posted October 27, 2021 Thanks for the detailed advice, @romain.gr! Link to comment Share on other sites More sharing options...
flim Posted October 28, 2021 Author Share Posted October 28, 2021 Thanks for the detailed advice +1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now