Autoembed di YouTube per Live Stream

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?

3 Mi Piace

Qualcuno ha ricevuto una risposta? Sembra proprio una (per quanto ne so) sostituzione di collegamenti YouTube.

È successo di nuovo oggi:

Questo link non viene incorporato
https://www.youtube.com/live/N4vz0rlpXus?feature=shared&t=1355

Ma questo sì
https://www.youtube.com/watch?v=N4vz0rlpXus&t=1355

Sì, posso capirlo manualmente, ma l’utente medio?

C’è qualcuno?

2 Mi Piace

Questo richiede una modifica al codice YouTube onebox per accettare entrambi gli URL in modo intercambiabile. Molto simile a quello che ho fatto in Twitch clips embed problem.

Per ora, sto etichettando questo come pr-welcome.

2 Mi Piace

Ho creato una PR:

7 Mi Piace

Riprova https://www.youtube.com/live/eJemwqO0SDw:

https://www.youtube.com/live/N4vz0rlpXus?feature=shared&t=1355:


Va bene!

5 Mi Piace