Page MenuHomeMiraheze

Enable external sites on the YouTube extension
Closed, ResolvedPublic

Description

Per https://meta.miraheze.org/wiki/Community_noticeboard#YouTube_extension and other users asking, we should probably consider either switching to the original YouTube extension or updating the fork to allow some external sites since some wikis would like to use them.

Per SPF in #miraheze :

SPF|Cloud> Reception123: I recall back then we did not want to support too many external sites for including resources
SPF|Cloud> we've never had a discussion about it really, if I'm right
SPF|Cloud> but given the fact we support Widgets which are basically unrestricted, and we have the CSP for 'review' now, I'm not against the extension itself

Event Timeline

Reception123 triaged this task as Normal priority.May 4 2020, 19:59
Reception123 created this task.

As a note, the Miraheze version of the extension currently has additional support for Google Videos, which the original YouTube extension does not have, and some Wikis may still be using.

As a note, the Miraheze version of the extension currently has additional support for Google Videos, which the original YouTube extension does not have, and some Wikis may still be using.

As seen here, the code for other video sites is just commented out. I think just uncommenting relevant parts would be enough to restore support for other sites; abandoning the fork is not necessary.

What I'm concerned about is nicovideo aka Nico Nico Douga. A lot of Japanese internet culture happens there, and referencing videos on nico would be very useful for any wiki covering relevant topics.

As a note, the Miraheze version of the extension currently has additional support for Google Videos, which the original YouTube extension does not have, and some Wikis may still be using.

As seen here, the code for other video sites is just commented out. I think just uncommenting relevant parts would be enough to restore support for other sites; abandoning the fork is not necessary.

What I'm concerned about is nicovideo aka Nico Nico Douga. A lot of Japanese internet culture happens there, and referencing videos on nico would be very useful for any wiki covering relevant topics.

Yup, I also agree that there's no need to move off the fork. Since it was brought up that there was consideration in switching to the original extension, just wanted to bring up in my earlier comment that there is Google Video support, which would be a reason to keep the current fork if some Wikis are still using Google Videos. And as you mentioned, the other sites could just be re-enabled by re-adding the commented out video sources.

Also took a look beforehand, but besides the aforementioned differences, the only other changes between the Miraheze version and the current version of the extension appear to be minor syntax differences (eg. Braces being on different lines, bracket array syntax instead of array()).

Okay, thanks for your comments. In that case the discussion should be centered around uncommenting the external sites.

Personally, I have no issue with doing so as seemingly there were originally excluded for resource purposes mainly.

Reception123 renamed this task from Enable external sites on the YouTube extension / switch to main version to Enable external sites on the YouTube extension .May 5 2020, 06:08

Hey. Excuse me please. But I want to use Facebook and Vkontakte video insertion in my wiki. How should I do it?

Because the extension uses http in alot of places, we won't be able to use this unless it's updated to use https.

I went through and found that the following services in the extension don't seem to exist anymore:

  • Wegame - Videos I found all 404'd. Seems to be closer to a Steam gaming service now rather than a video service, or at least I can't find their video section anymore.
  • Tangler - Tangler seems to have closed in 2012, and their website is dead.
  • GTrailer - Per Wikipedia, they were dissolved in 2016. Some of their content still runs on YouTube though.
  • GGTube - GoGreenTube goes to some NY landscaping service company now.

In addition, Archive.org Videos don't appear to work due to the CSP, but even then, I could not get Archive Video to work in my local copy of MediaWiki either as http://www.archive.org/flv/FlowPlayerWhite.swf in the return of embedArchiveOrgVideo() 404's.

Also, after looking at it again, Google Videos was also discontinued in 2012, which is why the current version of Extension:YouTube no longer has Google Video support.

Since the ask was for NicoVideo, I've changed the pull request to only enable NicoVideo considering the other options don't seem to be functional/exist. The NicoVideo code also looks like it already uses https as well, so it should be fine on that front.


On a semi-related note, perhaps there could be re-consideration of Extension:EmbedVideo as the video embed extension of choice if moving forward we would be OK with having other video services? It seems to have larger working video service support, but it was declined back in 2017 for security reasons. The extension seems to be more actively maintained (Last update a month ago), so it may have changed since then. Will open a new Phabricator task to see if it can be re-reviewed.

  • Wegame - Videos I found all 404'd. Seems to be closer to a Steam gaming service now rather than a video service, or at least I can't find their video section anymore.

Wegame is a Steam-like gaming service made by Tencent.
This page (on a wikihow-like website) suggests that the Wegame client supports screen-recording in-game, at least for League of Legends. It also says that videos that haven't been played in the first 7 days after uploading would be removed, which is probably why videos you found all 404'ed, if the video uploading feature is still present. The page was last updated in 2018 though, so the information might be outdated. I'm unable to find any videos either.

Since the ask was for NicoVideo, I've changed the pull request to only enable NicoVideo considering the other options don't seem to be functional/exist. The NicoVideo code also looks like it already uses https as well, so it should be fine on that front.

Second this.

Reception123 claimed this task.

Really sorry for the delay, NicoVideo can now be used.

Excuse me please. But I want to use Facebook

Content Security Policy: The page’s settings blocked the loading of a resource at https://embed.nicovideo.jp/watch/sm5508506 (“default-src https://silentblue.miraheze.org blob: data: https://*.miraheze.org https://*.wikimedia.org https://*.wikipedia.org https://*.wikibooks.org https://*.wiktionary.org https://*.wikiquote.org https://*.wikisource.org https://*.wikiversity.org https://*.wikinews.org https://*.wikivoyage.org https://*.mediawiki.org https://mediawiki.org https://*.wikidata.org https://wikidata.org https://*.wmflabs.org https://*.google.com https://*.gstatic.com https://*.addthis.com https://*.youtube.com https://*.youtube-nocookie.com https://maxcdn.bootstrapcdn.com https://twitter.com https://*.creativecommons.org https://images.uncyc.org https://www.mikrodev.com https://*.reviservices.com https://*.twitter.com https://www.sciencedaily.com https://*.googleapis.com https://*.twimg.com https://discordapp.com https://*.tile.openstreetmap.org https://*.freenode.net https://*.sorcery.net https://*.fontawesome.com https://*.a.wmflabs.org https://nenawiki.org https://*.cloudytheology.com https://i.imgur.com https://na.llnet.sims3store.cdn.ea.com https://cdn.discordapp.com https://m.media-amazon.com https://image.tmdb.org https://*.stripe.com https://*.twitch.tv https://*.fastly.net https://*.facebook.com https://*.shields.io https://*.bilibili.com https://*.163.com https://discord.com https://googleusercontent.com https://imgbox.com https://cdnjs.cloudflare.com https://cdn.jsdelivr.net https://reddit.com https://*.reddit.com https://redd.it https://*.redd.it https://redditmedia.com https://*.redditmedia.com https://dropbox.com https://*.dropbox.com https://dropboxstatic.com https://*.dropboxstatic.com https://disqus.com https://*.disqus.com 'unsafe-inline' 'unsafe-eval'”).

You forgot to add nicovideo to the content security policy.

Incorrectly assumed it was already on the CSP whitelist, my apologies. New PR to add it to whitelist here: https://github.com/miraheze/puppet/pull/1436

Unknown Object (User) moved this task from Actions Needed (Review) to Backlog on the Extensions board.Mar 27 2021, 01:17
Unknown Object (User) moved this task from Backlog to Short Term on the MediaWiki (SRE) board.
Unknown Object (User) moved this task from Unsorted to Short Term on the Universal Omega board.