Jump to content
Search Community

antonio michelon

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by antonio michelon

  1. Apologies for the duplicate post, it won't happen again. now the code works in codepen, but when i put it in visual studio code it doesn't work the part of restarting the video, just starting and pausing, i installed the greensock snippets extension, do i need anything else?
  2. hey guys I'm starting on Gasp, I'm trying to use the scrollingtrigger to control a video according to the page's scroll, with the examples I found here on the site I managed to make play and pause work, but I still couldn't make the video start from the beginning when I go back to the video, in the code I changed the pause option to restart, but nothing has changed in the behavior of the video, below is the code with the restart. grateful for the help! let videoElem = videoDiv.querySelector('video') ScrollTrigger.create({ trigger: videoElem, start: 'top 80%', end: 'top 20%', markers: true, onEnter: () => videoElem.play(), onEnterBack: () => videoElem.play(), onLeave: () => videoElem.restart(), onLeaveBack: () => videoElem.restart(),
  3. Hi! https://codepen.io/Antonio-Miguel-Michelon/pen/eYPLmzv
  4. hey guys I'm starting on Gasp, I'm trying to use the scrollingtrigger to control a video according to the page's scroll, with the examples I found here on the site I managed to make play and pause work, but I still couldn't make the video start from the beginning when I go back to the video, in the code I changed the pause option to restart, but nothing has changed in the behavior of the video, below is the code with the restart. grateful for the help! let videoElem = videoDiv.querySelector('video') ScrollTrigger.create({ trigger: videoElem, start: 'top 80%', end: 'top 20%', markers: true, onEnter: () => videoElem.play(), onEnterBack: () => videoElem.play(), onLeave: () => videoElem.restart(), onLeaveBack: () => videoElem.restart(),
×
×
  • Create New...