From: Vincent Vanwaelscappel Date: Thu, 30 Jan 2025 15:54:41 +0000 (+0100) Subject: wip #7291 @2 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=dea6b83c501b6ec03a95273f5eef99c7c93de7b3;p=cubist_util.git wip #7291 @2 --- diff --git a/src/WebVideo.php b/src/WebVideo.php index 939c3cb..488e304 100644 --- a/src/WebVideo.php +++ b/src/WebVideo.php @@ -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); + } + }