A user, safeharbor, reports that YouTube and Vimeo videos are not embedding properly in their private Discourse community, despite whitelisting domains and using unlisted/public videos. The issue appears tied to how Discourse’s onebox system handles unlisted YouTube videos — merefield suggests unlisted videos may require login, which onebox can’t simulate. safeharbor confirms the video is viewable logged out, and Jagster notes direct YouTube links (e.g., youtu.be) should work. Architect and Heliosurge discuss edge cases, including live videos and potential bugs in the Stable branch. safeharbor confirms the video is unlisted, not private, and their forum is private — though Heliosurge notes this didn’t block embedding in their Tests-Passed instance. safeharbor is on Discourse Hosting (Standard plan) and doesn’t see an experimental onebox setting. JammyDodger confirms video embedding is allowed on Standard and advises contacting @team via PM or email for direct support, which safeharbor has done. Safe Mode didn’t resolve the issue safeharbor. The core problem remains unresolved but appears to be a onebox rendering limitation or configuration issue specific to their setup.
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?
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:
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.
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?
Thanks everyone for the feedback. @JagsterSafe 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.
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.