From dea6b83c501b6ec03a95273f5eef99c7c93de7b3 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 30 Jan 2025 16:54:41 +0100 Subject: [PATCH] wip #7291 @2 --- src/WebVideo.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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); + } + } -- 2.39.5