From: vincent@cubedesigners.com Date: Mon, 4 Oct 2021 14:46:38 +0000 (+0000) Subject: wait #4742 @0.75 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=633656feb4f72b27c827919b82356ba04f64996d;p=cubeextranet.git wait #4742 @0.75 --- 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;