From: vincent@cubedesigners.com Date: Thu, 25 Aug 2022 10:25:18 +0000 (+0000) Subject: wip #5417 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=7e9452f428ebb8555c54b742d4e5f8d649289864;p=cubeextranet.git wip #5417 @0.25 --- 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 b18924d3b..3c0e63898 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.links.php +++ b/inc/ws/Util/html5/master/class.ws.html5.links.php @@ -835,7 +835,16 @@ class wsHTML5Link public function getConfigHTML($d, $html) { + + $c = file_get_contents($this->wdir . $html); $res = array('width' => $this->video_width, 'height' => $this->video_height); + if (stristr($c, '
')) { + if (preg_match('/var animationData = (\{.*\})/', $c, $m)) { + $ad = json_decode(trim($m[1]), true); + $res['width'] = $ad['w']; + $res['height'] = $ad['h']; + } + } $r = array('type' => 'html', 'html' => $html, 'inject' => array(), 'injectcss' => array(), 'injectjs' => array()); return array_merge($res, $r);