]> _ Git - fluidbook_tools.git/commitdiff
wip #4756 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 6 Oct 2021 14:16:20 +0000 (16:16 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 6 Oct 2021 14:16:20 +0000 (16:16 +0200)
src/Compiler/Links.php
src/Links/VideoLink.php

index 5a01187576c413b9f2e86f63b7d84748f394f60b..986aacfee2a532b37f38b85bec03778249285edf 100644 (file)
@@ -402,19 +402,23 @@ trait Links
         return $fixed;
     }
 
+    public function getVideosFormats()
+    {
+        return ['mp4', 'jpg'];
+    }
+
     public function copyLinkFile($source, $dest, $video = false)
     {
-//        $types = $this->getVideosFormats();
-//        if ($video) {
-//            wsTools::encodeWebVideos($origDir . $source, null, true);
-//            $e = explode('.', $source);
-//            array_pop($e);
-//            $base = implode('.', $e);
-//            $source = array();
-//            foreach ($types as $type) {
-//                $source[] = $base . '.' . $type;
-//            }
-//        }
+        $types = $this->getVideosFormats();
+        if ($video) {
+            $e = explode('.', $source);
+            array_pop($e);
+            $base = implode('.', $e);
+            $source = array();
+            foreach ($types as $type) {
+                $source[] = $base . '.' . $type;
+            }
+        }
 
         if (!is_array($source)) {
             $source = array($source);
index bb9c18c7d3188964feaa96a2e49a440933ec6da8..0bd205243fb1b2ccd47af859a98b7c17d5ff70ff 100644 (file)
@@ -31,6 +31,7 @@ class VideoLink extends Link
     {
         if (!Url::isDistant($this->to)) {
             $this->copyExternalFile($this->to, true);
+
         }
 
         $w = round($this->width * $this->getCssScale());