Add Youtube short URLs
This commit is contained in:
parent
11464c3014
commit
867dc72abd
|
|
@ -1,4 +1,4 @@
|
|||
const YOUTUBE = /^(?:https:\/\/)?(?:www.)?youtube.com\/watch\?v=([a-zA-Z0-9_-]{11})$/;
|
||||
const YOUTUBE = /^(?:https:\/\/)?(?:www.)?(?:(?:youtube.com\/watch\?v=)|(?:youtu.be\/))([a-zA-Z0-9_-]{11})(?:.+)?$/;
|
||||
const VIMEO = /^(?:https:\/\/)?(?:www.)?vimeo.com\/([a-zA-Z0-9]*)$/;
|
||||
|
||||
export function isYoutubeUrl(url) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue