From 23cbd69d25965c8f142414204d80dd6f5f7fc1b6 Mon Sep 17 00:00:00 2001 From: David Mzareulyan Date: Fri, 8 Feb 2019 18:48:33 +0300 Subject: [PATCH] Add a maxheight parameter to noembed.com URL noembed.com cannot show some YouTube videos without this parameter: https://github.com/leedo/noembed/issues/98 --- src/components/link-preview/video.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/link-preview/video.jsx b/src/components/link-preview/video.jsx index 6bba997ee..d6686172a 100644 --- a/src/components/link-preview/video.jsx +++ b/src/components/link-preview/video.jsx @@ -172,7 +172,7 @@ function getDefaultAspectRatio(url) { async function getVideoInfo(url) { switch (getVideoType(url)) { case T_YOUTUBE_VIDEO: { - const data = await cachedFetch(`https://noembed.com/embed?url=${encodeURIComponent(url)}`); + const data = await cachedFetch(`https://noembed.com/embed?url=${encodeURIComponent(url)}&maxheight`); if (data.error) { return { error: data.error }; }