]> _ Git - cubist_util.git/commitdiff
wip #7291 @2
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 30 Jan 2025 15:54:41 +0000 (16:54 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 30 Jan 2025 15:54:41 +0000 (16:54 +0100)
src/WebVideo.php

index 939c3cbfae0630f861e0317e1a48dbe97c2112a7..488e3042ffea8333e34ddd6daa6393c5d4586a13 100644 (file)
@@ -217,5 +217,18 @@ class WebVideo
         return true;
     }
 
+    public static function getURL($service, $id, $options = [], $type = 'embed')
+    {
+        if ($type == 'embed') {
+            return self::getIframeUrl($service, $id, $options);
+        }
+
+        if ($service == 'youtube') {
+            $options['v'] = $id;
+            $base = 'https://www.youtube.com/watch';
+        }
+        return self::_getUrl($base, $options);
+    }
+
 
 }