antonio michelon
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by antonio michelon
-
-
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(),See the Pen eYPLmzv by Antonio-Miguel-Michelon (@Antonio-Miguel-Michelon) on CodePen
-
-
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(),See the Pen eYPLmzv by Antonio-Miguel-Michelon (@Antonio-Miguel-Michelon) on CodePen
Scrolltrigger not restart the video
in GSAP
Posted
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?