feat: add support for youtube lives previews (#468)

This commit is contained in:
Daniel Vergara
2025-08-10 02:12:00 -06:00
committed by GitHub
parent b8b9c976f6
commit fdc5757c63
3 changed files with 5 additions and 2 deletions

View File

@@ -94,7 +94,8 @@ function parseYoutubeUrl(url: string) {
const patterns = [
/(?:youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/embed\/)([^&\n?#]+)/,
/youtube\.com\/watch\?.*v=([^&\n?#]+)/,
/youtube\.com\/shorts\/([^&\n?#]+)/
/youtube\.com\/shorts\/([^&\n?#]+)/,
/youtube\.com\/live\/([^&\n?#]+)/
]
let videoId: string | null = null