YouTube livestream embeds do not embed correctly if used with share link ( https://youtube.com/live/ )

(#5120) Bug Open: Needs triage embeds

Reproduction steps

Send a Youtube livestream share link, like https://www.youtube.com/live/9EsLgBXaqQI

Expected behaviour

The livestream creates a Youtube embed

Actual behaviour

The embed just has a thumbnail as the image and does not provide the ability to play it within the embed, like a video would.

5 comments

Sign in with Fluxer to comment and vote.
Comment by Nsgr
Nsgr OP1 vote edited
Can be fixed by adding /live/ to the paths in the youtube resolver like this:
    if path.starts_with("/live/") {
        return path
            .strip_prefix("/live/")?
            .split('/')
            .next()
            .map(|s| s.to_owned());
    }
Tested locally.
Comment by Jiralite
JiraliteMod 1 vote 2 replies
What is that before and after supposed to represent? Before and after what?
Comment by Nsgr
Nsgr OP1 vote edited 1 reply
Before and after the fix I posted in the comments, sorry for not clarifying.
Comment by Nsgr
Nsgr OP1 vote
Thinking about the code repetitions, a for loop should actually be a better solution:
for prefix in ["/shorts/", "/v/", "/live/"] {
        if path.starts_with(prefix) {
            return path
                .strip_prefix(prefix)?
                .split('/')
                .next()
                .map(|s| s.to_owned());
        }
    }
Please let me know if I should / can PR this! :)
Comment by Sunlight Hertz
CR Stable Desktop 2026.1129.234430, Web 2026.1202.40907, macOS 27.2.1 (arm64), Electron 44.10.0, Chrome 152.0.7977.169, Node 24.22.1, Locale en-US