var controller = new ScrollMagic.Controller();
var scene = new ScrollMagic.Scene({
triggerElement: '#video-mask-trigger',
duration: 400,
offset: 250
})
.setTween('.video-mask__media', 0.3, {
width: '100%',
height: '100%'
}) // trigger a
TweenMax.to tween
.addIndicators({name: "1 (duration: 0)"}) // add indicators (requires plugin)
.addTo(controller);
scene.on("end", function (event) {
let thisVideo = $('.js-video');
thisVideo.addClass("js-cursor");
// thisVideo.find("video")[0].play();
thisVideo.find("video").addClass("videoplay");
thisVideo.find(".circle-follow").addClass("js-active");
thisVideo.find(".js-video-title").fadeOut();
});
scene.on("start", function (event) {
let thisVideo = $('.js-video');
thisVideo.removeClass("js-cursor");
// thisVideo.find("video")[0].pause();
thisVideo.find("video").removeClass("videoplay");
thisVideo.find(".circle-follow").removeClass("js-active");
thisVideo.find(".js-video-title").fadeIn();
});