also fix URLs containing dashes
parent
0887a5fb08
commit
b331e23214
|
@ -19,7 +19,7 @@
|
||||||
let audioPlayer;
|
let audioPlayer;
|
||||||
|
|
||||||
function extract(url) {
|
function extract(url) {
|
||||||
const match = url.match(/(youtu\.be\/|v=)([\w]+)/);
|
const match = url.match(/(youtu\.be\/|v=)([\w-]+)/);
|
||||||
if (match) {
|
if (match) {
|
||||||
return match[2];
|
return match[2];
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue