YouTube embed fix (#442)

This commit is contained in:
stairman06
2022-03-29 23:27:05 -05:00
committed by GitHub
parent 2c83425b42
commit 2507170816

View File

@@ -19,7 +19,7 @@ const options = {
const allowedSources = [
{
regex:
/^https?:\/\/(www\.)?youtube\.com\/embed\/[a-zA-Z0-9_]{11}(\?&autoplay=[0-1]{1})?$/,
/^https?:\/\/(www\.)?youtube(-nocookie)?\.com\/embed\/[a-zA-Z0-9_-]{11}(\?&autoplay=[0-1]{1})?$/,
remove: ['&autoplay=1'], // Prevents autoplay
},
]