fix: m.youtube.com embeds broken
This commit is contained in:
1 parent
9758f4c829
commit
d6c83d2e06
1 file changed
+1
-1
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
function youtubeVideoID(url: string): string | null {
|
function youtubeVideoID(url: string): string | null {
|
||||||
const regex =
|
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)
|
const match = url.match(regex)
|
||||||
|
|
||||||
if (match && match[1]) {
|
if (match && match[1]) {
|
||||||
|
|||||||
Reference in new issue
Block a user