feat(components): add support for youtube shorts (#463)

This commit is contained in:
Daniel Vergara
2025-07-31 19:25:29 -06:00
committed by GitHub
parent 63936589d8
commit 3cd86bb1da
2 changed files with 3 additions and 2 deletions

View File

@@ -87,7 +87,8 @@ export default function YoutubeEmbeddedPlayer({
function extractVideoId(url: string) {
const patterns = [
/(?:youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/embed\/)([^&\n?#]+)/,
/youtube\.com\/watch\?.*v=([^&\n?#]+)/
/youtube\.com\/watch\?.*v=([^&\n?#]+)/,
/youtube\.com\/shorts\/([^&\n?#]+)/
]
for (const pattern of patterns) {