YouTube Video Not Embedding

I searched all the topics for this question but have not found something to help resolve my issue.

I have an Unlisted YT video and if I paste in the link as a member into a post I get this:

image

I whitelisted several YT domains under the “allowed iframes” setting, and it doesn’t render the YT video.

image

I also get this for a Vimeo embed too, which I added to the whitelist:

image

What am I missing?

It does not require an iframe, it is an embed supported by onebox out of the box.

That’s probably your issue - I suspect you cannot view the page of an unlisted video without being logged in - something an anonymous onebox crawl is not going to be able to do.

If you log out of youtube and paste the video link into the browser - what do you see?

1 Like

This thread seems to suggest that onebox can render unlisted videos but I may be misunderstanding something there.

The video still displays in a browser logged out or using incognito mode.


Regarding Vimeo, I pasted the wrong image. This below is what I see in preview when pasting in the Vimeo link for a post:

image

1 Like

If unlisted means it will be shown using direct link then it works.

As this:

2 Likes

It can depend on the type and version of the link, for instance the link for a YouTube live video (https://www.youtube.com/live/- ####) does not correctly one-box but instead renders as:

Which now looks like a link to the YouTube home page, not specific video.

Is the video unlisted & private? If the video is private it will not show.

1 Like

That could be a bug. I have had live video from YouTube onebox fine at least in Stable. Have not tested in Tests-Passed

Although I have seen some odd behavior on stable branch recently. Where the odd link from my Tests-Passed doesn’t always one box

That is version of this occurring, probably bug then.

The bug is occuring on the stable forum not on tests-passed

Link to topic

I have had iirc the odd Reddit link not populate on stable as well

1 Like

It’s not a live link. Just a regular link with the following formats:

https://youtu.be/xxxxxxx

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

When I paste the link into our topic here it renders an image (looks like the thumbnail) but not the actual video to play. That’s a step better than what my community displays.

The video is unlisted, not private, as shown below.

image

My Discourse community is private. Will this have any effect on the embedded video functionality?


I had made the Vimeo video public.

1 Like

Not sure. I had my Tests-passed community before with require login and YT oneboxing seemed to work fine.

Are you running Stable or Tests-Passed?

If Tests-passed have you enabled the experimental new onebox option? I haven’t enabled it on mine.

I assume I am using Tests-Passed. I use Discourse hosting.

I looked through my site settings as admin and cannot see an experimental option for onebox.

2 Likes

My bad Light Box.

Not sure if this might affect YouTube onebox or not.

As earlier showed embedding works here. So then comes basic questions: does safe mode work, and your forum is on stable on some version if I understood right. Perhaps upgrading helps?

3 Likes

Thanks everyone for the feedback. @Jagster Safe Mode did not help, and I am subscribed to the Standard plan. I cannot say for certain whether I am permitted to use video embedding with this plan level.

1 Like

You can embed videos on the standard plan. :+1:

Oneboxes should work, as well as allowing other allowed iframes if the onebox doesn’t handle them automatically. You can even upload video too, though you may hit storage limits depending on size.

If you’re still having issues, as a hosted customer you can message @team or email team@discourse.org for direct support and we can take a closer look at your setup and see what the problem might be.

5 Likes

Thanks I just PM’d the team handle.

2 Likes