]> _ Git - fluidbook-toolbox.git/commitdiff
wait #5911 @0:20
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 4 May 2023 13:49:28 +0000 (15:49 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 4 May 2023 13:49:28 +0000 (15:49 +0200)
app/Fluidbook/Links.php

index 4b8e1a817b083ad42128108daae9239355c5c2f3..b000b3fde0e1f9ba20e1cf2ba0ad775b9dfd49e1 100644 (file)
@@ -7,6 +7,7 @@ use App\Models\User;
 use Cubist\Util\Files\Files;
 use Cubist\Util\Gzip;
 use Cubist\Util\Str;
+use Cubist\Util\WebVideo;
 use Fluidbook\Tools\Links\Link;
 use PhpOffice\PhpSpreadsheet\Cell\DataType;
 use PhpOffice\PhpSpreadsheet\Exception;
@@ -549,6 +550,14 @@ class Links
                     $link['to'] = '';
                 }
 
+                $webvideo = WebVideo::parse($link['to'], true);
+                if ($webvideo !== false) {
+                    $link['type'] = '10';
+                    $link['video_service'] = $webvideo['service'];
+                    $link['inline'] = 'popup';
+                    $link['to'] = $webvideo['id'];
+                }
+
                 $link['display_area'] = '1';
                 $link['page'] = $page;
                 $link['uid'] = self::generateUID();