From 5fd78f80dac94178ab1167f3308bd0b328e04a75 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Tue, 3 Jan 2017 15:13:27 +0000 Subject: [PATCH] done #1058 @2 --- inc/ws/Util/html5/class.ws.html5.links.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/inc/ws/Util/html5/class.ws.html5.links.php b/inc/ws/Util/html5/class.ws.html5.links.php index 95c2a04b5..a83f26234 100644 --- a/inc/ws/Util/html5/class.ws.html5.links.php +++ b/inc/ws/Util/html5/class.ws.html5.links.php @@ -805,6 +805,16 @@ class htmlMultimediaLink extends wsHTML5Link { public function getConfigZIP($d) { $res = array('width' => $this->video_width, 'height' => $this->video_height); if (file_exists($d . '/index.html')) { + $doc = new DOMDocument(); + $doc->loadHTMLFile($d . '/index.html'); + $xpath = new DOMXPath($doc); + $c = $xpath->query("//canvas"); + foreach ($c as $canvas) { + /* @var $canvas DOMElement */ + $res['width'] = intval((string)$canvas->getAttribute('width')); + $res['height'] = intval((string)$canvas->getAttribute('height')); + } + $r = array('html' => 'index.html', 'inject' => array(), 'injectcss' => array(), 'injectjs' => array()); } else { $r = array('html' => false, 'inject' => array(file_get_contents($d . '/init.js')), 'injectcss' => array('multimedia.css'), 'injectjs' => array('multimedia.js')); -- 2.39.5