support /live/ urls

This commit is contained in:
localhost 2025-10-14 20:54:27 +02:00
parent c673a4dbc9
commit 7d1cdf0952
1 changed files with 2 additions and 0 deletions

View File

@ -14,6 +14,8 @@ function validateVideo(input: string): string | false {
videoId = url.searchParams.get('v')! videoId = url.searchParams.get('v')!
} else if (url.pathname.startsWith('/shorts/')) { } else if (url.pathname.startsWith('/shorts/')) {
videoId = url.pathname.replace('/shorts/', '') videoId = url.pathname.replace('/shorts/', '')
} else if (url.pathname.startsWith('/live/')) {
videoId = url.pathname.replace('/live/', '')
} else return false } else return false
// removed - embed url // removed - embed url
} }