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'));