]> _ Git - cubeextranet.git/commitdiff
wait #4742 @0.75
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 4 Oct 2021 14:46:38 +0000 (14:46 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 4 Oct 2021 14:46:38 +0000 (14:46 +0000)
inc/ws/Util/html5/master/class.ws.html5.links.php

index e167ed02554e10f629908a9344780b011a7a7ce6..f3e91757a7ccfc72bc8fdda15562c9241f1bd417 100644 (file)
@@ -1282,12 +1282,20 @@ class videoLink extends wsHTML5Link
         if (!is_null($w) && !is_null($h)) {
             $attr['width'] = $w;
             $attr['height'] = $h;
-        } else if (!is_null($compiler) && CubeIT_Util_Url::isLocal($data->to)) {
+        }
+
+        if (!is_null($compiler)) {
             // Get video dimensions from thumbnail if possible (locally uploaded files)
-            $path = $compiler->wdir . '/' . $data->to;
+            if (CubeIT_Util_Url::isLocal($data->to)) {
+                $path = $compiler->wdir . '/' . $data->to;
+            } else {
+                $path = $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 (isset($e[0]) && is_numeric($e[0])) {
+                $attr['width'] = $e[0];
+                $attr['height'] = $e[1];
+            }
         }
 
         return $attr;