Skip to content
Snippets Groups Projects
Verified Commit e5c1a629 authored by David Beniamine's avatar David Beniamine
Browse files

Allow /embed url

parent ac3db99e
No related branches found
No related tags found
No related merge requests found
......@@ -46,7 +46,7 @@ class ProjectRetriever
private function getYoutubeVideoIdFromUrl(string $video_url): string
{
$pattern = "#(?<=v=|v\/|vi=|vi\/|youtu.be\/)[a-zA-Z0-9_-]{11}#";
$pattern = "#(?<=v=|v\/|vi=|vi\/|youtu.be\/|embed/)[a-zA-Z0-9_-]{11}#";
$result = preg_match($pattern, $video_url, $matches);
$video_id = "";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment