]> _ Git - fluidbook-html5.git/commitdiff
wip #8000 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 13 Feb 2026 11:37:01 +0000 (12:37 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 13 Feb 2026 11:37:01 +0000 (12:37 +0100)
js/libs/fluidbook/fluidbook.video.js

index 2dfcd252c2743dd04b7e75594f06b17293711f88..1eab758f736bce16f06935e6d1af1d50517ed37a 100644 (file)
@@ -113,6 +113,17 @@ FluidbookVideo.prototype = {
         var statsName = $(e).data('stats-name');
         var statsType = $(e).data('stats-type');
         var setup = $(e).data('setup');
+
+        if (this.fluidbook.settings.linkShortener && this.fluidbook.settings.linkShortener !== 'none') {
+            for (let s in setup.sources) {
+                let v = setup.sources[s];
+                if (v.type === 'video/youtube' && this.fluidbook.links.shortLinks[v.src] !== undefined) {
+                    setup.sources[s].src = this.fluidbook.links.shortLinks[v.src];
+                }
+            }
+        }
+
+
         var linkid = $(e).data('link-id');
         var url = $(e).data('url');
         var tracks = $(e).data('tracks');