Use the YouTube no cookie URL for embedding. (#6722)

This commit is contained in:
Logan Rockmore
2021-01-18 17:48:33 -05:00
committed by GitHub
parent 61fc6afb1d
commit a33735e55e
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ module.exports = async (ctx) => {
return {
title: snippet.title,
description: `${
embed ? '<iframe id="ytplayer" type="text/html" width="640" height="360" src="https://www.youtube.com/embed/' + videoId + '" frameborder="0" allowfullscreen></iframe>' : '<img src="' + img.url + '">'
embed ? '<iframe id="ytplayer" type="text/html" width="640" height="360" src="https://www.youtube-nocookie.com/embed/' + videoId + '" frameborder="0" allowfullscreen></iframe>' : '<img src="' + img.url + '">'
}${utils.formatDescription(snippet.description)}`,
pubDate: new Date(snippet.publishedAt).toUTCString(),
link: `https://www.youtube.com/watch?v=${videoId}`,
+1 -1
View File
@@ -24,7 +24,7 @@ module.exports = async (ctx) => {
const img = utils.getThumbnail(snippet.thumbnails);
return {
title: snippet.title,
description: `${embed ? '<iframe id="ytplayer" type="text/html" width="640" height="360" src="https://www.youtube.com/embed/' + videoId + '" frameborder="0" allowfullscreen></iframe>' : '<img src="' + img.url + '">'}
description: `${embed ? '<iframe id="ytplayer" type="text/html" width="640" height="360" src="https://www.youtube-nocookie.com/embed/' + videoId + '" frameborder="0" allowfullscreen></iframe>' : '<img src="' + img.url + '">'}
${utils.formatDescription(snippet.description)}`,
pubDate: new Date(snippet.publishedAt).toUTCString(),
link: `https://www.youtube.com/watch?v=${videoId}`,
+1 -1
View File
@@ -25,7 +25,7 @@ module.exports = async (ctx) => {
return {
title: snippet.title,
description: `${
embed ? '<iframe id="ytplayer" type="text/html" width="640" height="360" src="https://www.youtube.com/embed/' + videoId + '" frameborder="0" allowfullscreen></iframe>' : '<img src="' + img.url + '">'
embed ? '<iframe id="ytplayer" type="text/html" width="640" height="360" src="https://www.youtube-nocookie.com/embed/' + videoId + '" frameborder="0" allowfullscreen></iframe>' : '<img src="' + img.url + '">'
}${utils.formatDescription(snippet.description)}`,
pubDate: new Date(snippet.publishedAt).toUTCString(),
link: `https://www.youtube.com/watch?v=${videoId}`,