From 633656feb4f72b27c827919b82356ba04f64996d Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Mon, 4 Oct 2021 14:46:38 +0000 Subject: [PATCH] wait #4742 @0.75 --- .../Util/html5/master/class.ws.html5.links.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/inc/ws/Util/html5/master/class.ws.html5.links.php b/inc/ws/Util/html5/master/class.ws.html5.links.php index e167ed025..f3e91757a 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.links.php +++ b/inc/ws/Util/html5/master/class.ws.html5.links.php @@ -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; -- 2.39.5