Merge pull request #368 from sevonj/fix-yt-m-link-embed

fix: m.youtube.com embeds
This commit is contained in:
Xylight authored and GitHub committed 2024-07-24 04:22:30 -07:00
commit b93729f4ac
1 file changed
+1 -1
@@ -15,7 +15,7 @@
function youtubeVideoID(url: string): string | null {
const regex =
/^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|shorts\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/
/^(?:https?:\/\/)?(?:www\.|m\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|shorts\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/
const match = url.match(regex)
if (match && match[1]) {