YouTube embeds appearing way too small

Hello,

I’m hoping someone might be able to help

We recently updated Discourse to version 3.4.0.beta1-dev (latest-release +50) and since then our video embeds are displaying like this (way too small)

Whereas prior to the latest Discourse update they displayed as shown below.

Any help or suggestions would be greatly appreciated

Thank you

Does this issue occur on try.discourse.org as well, or is it specific to your forum?

Thanks for replying.
I just tested it on try.discourse.org and the embed works fine.

They are working for me ok.

Do you have theming? Check your CSS by using the browser inspector and see if there’s a rule from a Theme which is influencing any dimension of the embed.

Hi Robert,

Thanks for the reply.

I’m not sure if it’s relevant but I noticed that when I inspect the old video clip, I can see there’s a mention of the .lazy-video-container

However when I inspect the new, smaller embed, there is no mention of the .lazy-video-container

I have also tried using safe mode and the problem still exists.

Also, not sure if it’s connected but when posting a YouTube link, we don’t get the preview image.

Hello :wave:

If I am correct than on your two shared screenshots in OP. The first one is shows a YouTube video shared with embedding code (I suspect it because the video author avatar is appears). The second one is shared with link.

On the first one the embedding code contains such parameters like size etc… I think only the second (shared link) video goes through the Discourse magic process to make it lazy loading and set the size etc…

On my forum it was pretty common to share embedding code instead of link. I had to warn users to share only the link as we have lots of topics with music, movie etc… and a tons of shared YouTube videos. If they shared it with embedding code the whole topic will slow down because when you open it it will load the videos.

2 Likes

Hi Don,

Thanks for the reply.

I just doubled checked and the link used in both cases is (without the " ")

https://www.youtube.com/watch?v=yywGN4AIFEI

So it’s definitely interesting that about a week ago, it was processed fine through the Discourse lazy loading process on our forum and yet now it doesn’t seem to be working for the same video.

Yeah that’s interesting :thinking:

Is that YouTube lazy loading site setting enabled on your site?

1 Like

Yes, it is.
I even tried disabling it and then re-enabling it to see if that would get it working but it didn’t

1 Like

Have you rebaked the Post?

The CSS might be old.

(Go to Post admin wrench and select Rebuild HTML - you can do this in bulk if this works with a different technique)

2 Likes

Hi Robert,

Thanks but unfortunately the Rebuild HTML option didn’t fix the issue

2 Likes

Have you uninstalled the Youtube lazy load plugin? This is no longer required and worse might be interfering.

1 Like

Thanks for that suggestion, I just checked and it’s not listed (unless I’m looking in the wrong place)

2 Likes

Caching?

Could you try adding &hello=1 on the end of the URL to see if it is due to the cache

1 Like

No luck in fixing it (but I’ve just learned something new)

I really appreciate you taking the time to help.

At this stage it remains a mystery and it’s not the end of the world, so I may just have to wait and hope a future Discourse update magically gets it working again.

1 Like

Styleguide is in core so you should remove that from plugins and I read somewhere Fingerprint is broken in some way. Unfortunately I didn’t find the post. :thinking:

Can you try rebake post like Robert mentioned or post a new video in safe mode?

1 Like

Hi Don.

Thanks for the info about Styleguide, I’ll remove it from the plugins

Unfortunately the rebake didn’t work and as per your suggestion, I just tried posting a different YouTube video in safe mode and the same problem exists.

2 Likes