]> _ Git - fluidbook_tools.git/commitdiff
wip #8000 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 12 Feb 2026 18:14:39 +0000 (19:14 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 12 Feb 2026 18:14:39 +0000 (19:14 +0100)
src/Links/VideoLink.php
src/Links/WebVideoLink.php

index dfe9785f5a79ac26ad6ab74da009a1a6a733234f..1e6b4d989f934429c7a1fecad00560648eb89762 100644 (file)
@@ -77,7 +77,7 @@ class VideoLink extends Link
         $attr['stats-name'] = $attr['name'];
         $attr['stats-type'] = 'video';
         if (Url::isDistant($data->to)) {
-            $attr['url'] = $data->to;
+            $attr['url'] = $compiler->shortenURL($data->to);
         }
         $attr['id'] = 'video_' . $data->id;
         $attr['autoplay'] = ($data->video_auto_start ? '1' : '0');
index fa7980e232979f3221e790043fb31096b28c4bde..b9c8171adce0f3556a97fd5c9cc40fd262e6cbcf 100644 (file)
@@ -59,7 +59,7 @@ class WebVideoLink extends VideoLink
                     'sources' => [
                         [
                             'type' => 'video/youtube',
-                            'src' => 'https://www.youtube.com/watch?v=' . $data->to
+                            'src' => $compiler->shortenURL('https://www.youtube.com/watch?v=' . $data->to)
                         ]
                     ],
                     "youtube" => ["loop" => $data->video_loop, 'showinfo' => '0', 'cc_load_policy' => '1', 'ytControls' => '1'],