Jump to content
Search Community

Scroll to control video position

flim test
Moderator Tag

Recommended Posts

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.

 

apple.gif.fc0efdbe4ffd8f00b75a9738eb050286.gif

 

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!

 

 

  • Like 4
  • Thanks 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...