cogdog reported that Discourse’s YouTube onebox fails to auto-embed live stream URLs (e.g., https://www.youtube.com/live/...), though manually converting them to standard watch URLs (e.g., https://www.youtube.com/watch?v=...) works. cogdog reiterated the issue, noting the inconvenience for non-technical users. Falco confirmed the fix requires updating the YouTube onebox code to handle both URL formats, similar to a prior Twitch clips fix, and tagged it as pr-welcome. Arkshine submitted a PR to address this, and in post 5, demonstrated that the updated code successfully embeds live stream URLs, confirming the fix works as intended.
I run a few live events using Streamyard that go directly to YouTube. The stream becomes the recording, so the link is always good.
I notice that Discourse does not seem to embed the different URL format YouTube uses for this videos giving a generic OneBox e.g.,
https://www.youtube.com/live/eJemwqO0SDw e.g.
whereas by manually using the same ID in a standard YouTube URL does work in Discourse
https://www.youtube.com/watch?v=eJemwqO0SDw renders as expected
YouTube does not readily provide this form of a live stream video as a share link, so I end up manually re-writing the URLs. Seems like some pattern matching magic could manage this?