Page 1 of 1

Embedding youtube videos?

PostPosted: 12 Jul 2019, 06:00
by smcameron
So, a long time ago, embedding youtube videos here used to work. At some point, many years ago, it broke. Nowadays, I just link to the youtube video without trying to embed it here, on account of it being broken. But it used to work, and, embedding youtube videos is obviously possible as many, many sites do it. Is it possible here? How? And how can I fix-up this thread, which contains many previously working embedded videos that no longer work: https://forum.freegamedev.net/viewtopic.php?f=22&t=3710

Re: Embedding youtube videos?

PostPosted: 12 Jul 2019, 06:30
by fluffrabbit
Integrating YouTube with the FGD forums may not be in the interests of the community. Users have posted links to sites that integrate with YouTube and work around all of its BS. Embedding YouTube vids is embedding proprietary software. See Richard Stallman's "The JavaScript trap".

Re: Embedding youtube videos?

PostPosted: 12 Jul 2019, 06:58
by Julius
Well, yes... but it isn't actually intentional that it doesn't work. There was some issue with the specific YouTube embedded plugin (?) when we upgraded tp SSL, and ever since it is broken. But as outlined elsewhere, this forum is basically unmaintained and not upgradable due to various technical and non-technical issues.

Re: Embedding youtube videos?

PostPosted: 12 Jul 2019, 08:13
by fluffrabbit
In theory you could do it like:

{l Code}: {l Select All Code}
<iframe src="//youtube.com/embed/XXXX"></iframe>


Note that YouTube prefers embedding via iframe and that // resolves to the current protocol (http or https). Then you could have a youtube tag that only takes the video id and fills in the rest. Make sure you sanitize the input. Of course idk why anyone would want proprietary software here.

Re: Embedding youtube videos?

PostPosted: 12 Jul 2019, 15:34
by smcameron
Not ideal, but I figured out that I can do this (similar to what you have to do for github markdown pages):

If you have a youtube video with ID xxxxxxxx:

{l Code}: {l Select All Code}
[url=https://www.youtube.com/watch?v=xxxxxxxx][img]https://img.youtube.com/vi/xxxxxxxx/hqdefault.jpg[/img][/url]


Which will render a linked image with the youtube video thumbnail and if you click on it, it will take you to the video on youtube.

Re: Embedding youtube videos?

PostPosted: 12 Jul 2019, 16:08
by fluffrabbit
Nice! I didn't know yt provided thumbnail URLs.

Re: Embedding youtube videos?

PostPosted: 12 Jul 2019, 16:30
by smcameron
And I fixed up my giant space nerds thread. Thanks!

Re: Embedding youtube videos?

PostPosted: 09 Oct 2019, 17:35
by Wuzzy
Pro tip: Use https://invidio.us/ for your YouTube binge-watching needs without running proprietary Google crap. :)

I have no idea how to embed those, however.

Re: Embedding youtube videos?

PostPosted: 10 Oct 2019, 14:43
by Jastiv
Videos of gameplay/ trailers could be uploaded elsewhere if someone could suggest a better site.

Re: Embedding youtube videos?

PostPosted: 03 Aug 2020, 18:21
by leisenming
Wow. This site is no longer maintainable has hit serveral forums. I used to be a member of wetcanvas.com and that had not been updated for 10+ years. Amazing!

Re: Embedding youtube videos?

PostPosted: 04 Aug 2020, 04:55
by Jastiv
I'm all for upgrading this site. I know people don't want to alienate the people who hang around here, but a crappy forum is off putting to new members posting much and making this community really thrive. Also I think the new forum should organize showcase projects by game genre. Also COVID 19 lockdown is a great time for people to discover new freedom respecting software games, what with so much stuff closed and everything.