]> _ Git - fluidbook_tools.git/commitdiff
wait #6434 @1.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 23 Oct 2023 13:05:21 +0000 (15:05 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 23 Oct 2023 13:05:21 +0000 (15:05 +0200)
src/Links/HTMLMultimediaLink.php
src/Links/HTMLMultimediaPopupLink.php

index 1f0f34296ed6fef09c701a10813dbcf74974c53a..b5298e72a6dcdb40b62bb88446d8a396b85c00ba 100644 (file)
@@ -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 = '<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;
index 6c45701c4b10a5c54091d643ee82a160b8f217ec..76bf033b26de5a2c98e572c4f88007396f543e56 100644 (file)
@@ -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) . '" ';
     }
 }