Auslösen einer automatischen Wiedergabe von Videos basierend auf der Bildlaufposition

Ich schreibe ein Skript, das die Wipe-Animation aus dem Skript scrollorama.js verwendet. Ich hoffe, dass ich in der Lage bin, ein Video so zu implementieren, dass es bei bestimmten Markierungen in der Bildlauftiefe automatisch wiedergegeben wird: dh, wenn eine Videoseite eine andere ausgelöscht hat und jetzt vollständig angezeigt werden kann. Ich habe herausgefunden, wie man die Scrolltiefe misst. Ich logge sie erfolgreich in meiner Konsole ein. Ich habe herausgefunden, wie man misst, wie tief ich gescrollt habe, aber vielleicht bin ich so müde, dass ich nicht weiß, wie ich das Video auffordern soll, automatisch mit der Scroll-Tiefe abzuspielen. Ich hoffe, dass dies eine rechtliche Frage ist und dass ich Unterstützung bekommen kann. Hat das schon mal jemand ausprobiert? Hier ist der Code soweit.

enter code here $ (document) .ready (function () {

$ (window) .scroll (function (e) {

  var scrollAmount = $('body').scrollTop();
  console.log(scrollAmount);

});

    var controller = $.superscrollorama();
    var pinDur = 800;   
    // create animation timeline for pinned element
var pinAnimations = new TimelineLite();

//pinAnimations.append([TweenMax.to($('#green'), .5, {css:{top:0}})], .5)
pinAnimations.append([TweenMax.to($('#intromovie'), .5, {css:{top:0}})], .5 )
pinAnimations.append([TweenMax.to($('#red'), .5, {css:{top:0}})], .5) 
pinAnimations.append([TweenMax.to($('#blue'), .5, {css:{top:0}})], .5 )
pinAnimations.append([TweenMax.to($('#movie1'), .5, {css:{top:0}})], .5);
pinAnimations.append([TweenMax.to($('#history1'), .5, {css:{top:0}})], .5);
//pinAnimations.append(TweenMax.to($('#pin-frame-unpin'), .5, {css:{top:'100px'}}));


controller.pin($('#content_wrapper'), pinDur, {
    anim:pinAnimations, 
    onPin: function() {
        $('#content_wrapper').css('height','100%');
    }, 
    onUnpin: function() {
        $('#content_wrapper').css('height','1000px');
    }


});

});

Antworten auf die Frage(2)

Ihre Antwort auf die Frage