From: Vincent Vanwaelscappel Date: Mon, 23 Oct 2023 13:05:21 +0000 (+0200) Subject: wait #6434 @1.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=29191c24390b97cd7ded558dc88ae10d7b99bdeb;p=fluidbook_tools.git wait #6434 @1.5 --- diff --git a/src/Links/HTMLMultimediaLink.php b/src/Links/HTMLMultimediaLink.php index 1f0f342..b5298e7 100644 --- a/src/Links/HTMLMultimediaLink.php +++ b/src/Links/HTMLMultimediaLink.php @@ -44,7 +44,7 @@ class HTMLMultimediaLink extends Link $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); } @@ -67,13 +67,8 @@ class HTMLMultimediaLink extends Link $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 = '
'; - $res .= ''; + $res .= ''; } if ($this->_externalIframe !== false) { $iw = $this->_config['width'] * $s; diff --git a/src/Links/HTMLMultimediaPopupLink.php b/src/Links/HTMLMultimediaPopupLink.php index 6c45701..76bf033 100644 --- a/src/Links/HTMLMultimediaPopupLink.php +++ b/src/Links/HTMLMultimediaPopupLink.php @@ -2,17 +2,22 @@ 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) . '" '; } }