Jump to content
Search Community

Timing gsap animations with video React

JJF test
Moderator Tag

Recommended Posts

Hello, Trying to figure out if you can time a gsap animation with a video. For instance, 17 seconds into the video fire of a gsap animation. No matter the  load up time of the website. Is this possible? If need be I can try to emulate a demo.

Link to comment
Share on other sites

Hi,

 

What you can do is check the current time property when using the time update event all HTML media elements have:

 

https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/timeupdate_event

https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/currentTime

 

Just some simple conditional logic and your GSAP animations will be running!

 

Happy Tweening!!!

Link to comment
Share on other sites

  • 2 weeks later...

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...