Skip to content

Commit

Permalink
add preg match youtube live
Browse files Browse the repository at this point in the history
  • Loading branch information
secondnetwork committed Nov 27, 2023
1 parent b85efd4 commit 5c8dcf7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Helpers/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ function video_id($url)
$video_type = '';
$video_id = '';

if (preg_match('%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i', $url, $match)) {
if (preg_match('%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=|live/)|youtu\.be/)([^"&?/ ]{11})%i', $url, $match)) {
$video_type = 'youtube';

// Here is a sample of the URLs this regex matches: (there can be more content after the given URL that will be ignored)
Expand Down

0 comments on commit 5c8dcf7

Please sign in to comment.