]> _ Git - fluidbook-html5.git/commitdiff
wait #7938 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 13 Jan 2026 15:20:20 +0000 (16:20 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 13 Jan 2026 15:20:24 +0000 (16:20 +0100)
js/libs/fluidbook/fluidbook.contentlock.js
js/libs/fluidbook/fluidbook.video.js

index 74547bb9bcbb773a245131450e09d8609f9e46a5..df4936817f52cb162a56dc947e386461a7245d8d 100644 (file)
@@ -142,6 +142,7 @@ FluidbookContentLock.prototype = {
             }
         });
 
+
         if (change || this.getNextLockPage() !== this.getMaxPage()) {
             this.setMaxPage(this.getNextLockPage(), false);
         }
index 5d89883e8120695ec4ad2cbf21e824965cf48380..531a62c5db7ef2752a879825955ce4c663d84f16 100644 (file)
@@ -266,6 +266,7 @@ FluidbookVideo.prototype = {
         function sendPlayEvent() {
             if (!playEventSent) {
                 $this.fluidbook.stats.trackEvent(statsType, 'play', statsName);
+                $this.fluidbook.contentlock.addAction(linkid, 'play');
                 playEventSent = true;
             }
         }
@@ -419,6 +420,7 @@ FluidbookVideo.prototype = {
 
                 setTimeout(function () {
                     $this.fluidbook.contentlock.addAction(linkid, 'complete');
+                    $this.fluidbook.contentlock.addAction(linkid, 'play');
                 }, (player.duration() - 5) * 1000);
             }
         });
@@ -435,6 +437,7 @@ FluidbookVideo.prototype = {
             syncAudioAndVideo(audioTrackList)
 
             $this.fluidbook.sound.pauseAmbientIfSomethingIsPlaying();
+            sendPlayEvent();
         });
 
         player.on('pause', function () {
@@ -491,6 +494,7 @@ FluidbookVideo.prototype = {
 
         player.on('ended', function () {
             $this.fluidbook.contentlock.addAction(linkid, 'complete');
+            $this.fluidbook.contentlock.addAction(linkid, 'play');
             syncAudioAndVideo(audioTrackList)
             var enabledTrack = getEnabledTrack(audioTrackList);
             if (enabledTrack) {