]> _ Git - fluidbook_tools.git/commitdiff
wait #5171 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 23 Mar 2022 13:17:07 +0000 (14:17 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 23 Mar 2022 13:17:07 +0000 (14:17 +0100)
src/Compiler/Links.php
src/Links/VideoLink.php

index 7a0e7d0ec68232db066300a497062a45f0d20f64..c858354d03724b7928b708949c450633fc28c09c 100644 (file)
@@ -210,6 +210,7 @@ trait Links
         }
         $allpages[] = 'background';
         $allpages[] = 'archives';
+        $allpages[] = 'slider';
         foreach ($linkPages as $linkPage => $true) {
             $allpages[] = $linkPage;
         }
index 0bd205243fb1b2ccd47af859a98b7c17d5ff70ff..5fa315624b10e03563c16158fcf0b4f04b26c916 100644 (file)
@@ -83,8 +83,13 @@ class VideoLink extends Link
             // Get video dimensions from thumbnail if possible (locally uploaded files)
             $path = file_exists($data->to) ? $data->to : $compiler->wdir . '/' . $data->to;
             $e = explode(',', `ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=p=0 $path`);
-            $attr['width'] = $e[0];
-            $attr['height'] = $e[1];
+            if (count($e) > 1) {
+                $attr['width'] = $e[0];
+                $attr['height'] = $e[1];
+            } else {
+                $attr['width'] = 1920;
+                $attr['height'] = 1080;
+            }
         }
 
         return $attr;