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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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) {