| @@ -66,9 +66,9 @@ | ||
| 66 | 66 | |
| 67 | 67 | // Extract video ID and thumbnail |
| 68 | 68 | if (strpos($video_url, 'youtube.com') !== false || strpos($video_url, 'youtu.be') !== false) { |
| 69 | 69 | // YouTube thumbnail extraction |
| 70 | - preg_match('/(?:youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/embed\/)([^&\n?#]+)/', $video_url, $matches); | |
| 70 | + preg_match('/(?:youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/embed\/|youtube\.com\/shorts\/|youtube\.com\/live\/)([^&\n?#\/]+)/', $video_url, $matches); | |
| 71 | 71 | $video_id = $matches[1] ?? ''; |
| 72 | 72 | $thumbnail_url = "https://img.youtube.com/vi/{$video_id}/maxresdefault.jpg"; |
| 73 | 73 | } elseif (strpos($video_url, 'vimeo.com') !== false) { |
| 74 | 74 | // Vimeo thumbnail extraction |