$this->_config = $this->getConfigHTML($d['dir'], $this->to);
$this->copyExternalFile($d['dir'] . '/' . $this->to);
}
- if (substr($this->to, 0, 4) == 'http') {
+ if (str_starts_with($this->to, 'http')) {
$this->_url = $this->_externalIframe = $this->to;
$this->_config = array('html' => false, 'width' => $this->width, 'height' => $this->height);
}
$iw = $this->_config['width'];
$ih = $this->_config['height'];
- $ld = ' ';
- if (isset($this->_config['lowDef'])) {
- $ld = ' data-ld="' . str_replace('index.html', $this->_config['lowDef'], $this->_url) . '" ';
- }
-
$res = '<div class="mask"></div>';
- $res .= '<iframe' . $ld . 'data-scale="' . $s . '" data-width="' . $iw . '" data-height="' . $ih . '" width="' . $iw . '" height="' . $ih . '" src="' . $this->_url . '" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel="" style="visibility:hidden;" tabindex="-1" onload="this.style.visibility=\'visible\';"></iframe>';
+ $res .= '<iframe data-scale="' . $s . '" data-width="' . $iw . '" data-height="' . $ih . '" width="' . $iw . '" height="' . $ih . '" src="' . $this->_url . '" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel="" style="visibility:hidden;" tabindex="-1" onload="this.style.visibility=\'visible\';"></iframe>';
}
if ($this->_externalIframe !== false) {
$iw = $this->_config['width'] * $s;
namespace Fluidbook\Tools\Links;
-class HTMLMultimediaPopupLink extends HTMLMultimediaPopupImage {
+class HTMLMultimediaPopupLink extends HTMLMultimediaPopupImage
+{
- public function getAdditionnalContent() {
+ public function getAdditionnalContent()
+ {
$i = $this->_init;
$i['inline'] = true;
$i['in_popup'] = true;
- $i['width'] = $i['video_width'];
- $i['height'] = $i['video_height'];
+ if (isset($i['video_width']) && isset($i['video_height'])) {
+ $i['width'] = $i['video_width'];
+ $i['height'] = $i['video_height'];
+ }
$l = self::getMultimediaInstance($this->id . '_content', $i, $this->compiler);
$markup = $l->getHTMLContainer();
+
return ' data-stats-type="popup_multimedia" data-stats-name="' . $this->to . '" data-multimedia="' . rawurlencode($markup) . '" ';
}
}