Skip to content

Commit

Permalink
Add a maxheight parameter to noembed.com URL
Browse files Browse the repository at this point in the history
noembed.com cannot show some YouTube videos without this parameter: leedo/noembed#98
  • Loading branch information
davidmz committed Feb 8, 2019
1 parent ef11f63 commit 23cbd69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/link-preview/video.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
}
Expand Down

0 comments on commit 23cbd69

Please sign in to comment.