Page 2 of 2

Re: YouTube Embedder

Posted: Mon Oct 28, 2019 4:19 pm
by gameboy2000
I tried embedding a Youtube video, but it didn't work.

Re: YouTube Embedder

Posted: Mon Oct 28, 2019 5:04 pm
by freebrickproductions
gameboy2000 wrote:
Mon Oct 28, 2019 4:19 pm
I tried embedding a Youtube video, but it didn't work.
What was the URL you were trying to embed? Was there anything after the video ID in the URL? Was it a "shortened" URL?

Re: YouTube Embedder

Posted: Mon Oct 28, 2019 6:35 pm
by gameboy2000
I sent a PM with the link.

Re: YouTube Embedder

Posted: Wed May 20, 2020 9:53 pm
by BNSF2184
I see its obviously workin for everyone else but not for me. So what am I doin wrong?

Re: YouTube Embedder

Posted: Thu May 21, 2020 10:55 am
by freebrickproductions
BNSF2184 wrote:
Wed May 20, 2020 9:53 pm
I see its obviously workin for everyone else but not for me. So what am I doin wrong?
It has to be the full YouTube URL (not the shortened one YouTube gives you when you hit "share", for some reason) with nothing after the video ID. Here's an example of one that works:

Code: Select all

[YouTube]https://www.youtube.com/watch?v=gy__Jp5SAtU[/YouTube]
Which produces this as the result:


And here's some examples of ones that don't work:

Code: Select all

[YouTube]https://www.youtube.com/watch?v=gy__Jp5SAtU&lc=UgySm4pTWO5fZoquBCF4AaABAg[/YouTube]
[YouTube]https://www.youtube.com/watch?v=gy__Jp5SAtU&t=35s[/YouTube]
[YouTube]https://www.youtube.com/watch?v=gy__Jp5SAtU&feature=youtu.be[/YouTube]
[YouTube]https://youtu.be/gy__Jp5SAtU[/YouTube]
As you can see below, all of those either don't work, or just fail to embed entirely:
[YouTube]https://www.youtube.com/watch?v=gy__Jp5 ... BCF4AaABAg[/YouTube]
[YouTube]https://www.youtube.com/watch?v=gy__Jp5SAtU&t=35s[/YouTube]
[YouTube]https://www.youtube.com/watch?v=gy__Jp5 ... e=youtu.be[/YouTube]
[YouTube]https://youtu.be/gy__Jp5SAtU[/YouTube]

I may see about fixing it so that the shorten URLs work as well, but I'll have to experiment around with that some.

EDIT:
Okay, I've now added a new bbcode, called YouTubeShort. Basically works the same way as the standard YouTube embed code, only with shortened URLs.

How it works is you essentially do this:

Code: Select all

[YouTubeShort]https://youtu.be/gy__Jp5SAtU[/YouTubeShort]
Which then allows the video to be embedded:

Re: YouTube Embedder

Posted: Thu May 21, 2020 11:02 pm
by BNSF2184
Ok cool. Ill try it next time I shoot a crossing.