Extension:PeerTubeEmbed

The PeerTubeEmbed extension allows embedding PeerTube videos in MediaWiki articles.

Please read the entirety of this page before installing the extension.

Configuration parameters

 * $wgPeerTubeEmbedDisableP2P: Disables P2P on all embeds if set to true. See the privacy section below.
 * $wgPeerTubeEmbedHostFilterMode: Controls the behavior of the host filter. Accepts two values: 'allow', which only allows embeds from hosts in the host filter, and 'deny', which refuses to create embeds from hosts in the host filter. See the security section below.
 * $wgPeerTubeEmbedHostFilterList: An array of hosts. You can add new entries as follows:

Usage
Add URL to the video where you want the video to be embedded.

For example: https://video.blender.org/w/s6dVWgGVCAYJQkbZZJvY1c.

Security
TL;DR: Configure the host filter to only allow known, trusted PeerTube instances and, if possible, setup CSP on your wiki.

Unlike centralized services like YouTube, PeerTube instances may be on any valid hostname. While the extension tries its best to make sure it is only embedding something that resembles a PeerTube URL, if the host filter isn't configured, it is trivial to use this extension to embed any arbitrary content on your wiki, regardless of any checks the extension does on URLs.

You should take a look at what instances are out there, and decide which ones you're comfortable allowing on your wiki.

For example, if you only want to allow embedding videos from TILvids, the configuration may look as follows:

Additionally, consider setting up a Content Security Policy. How to do this depends on what setup you have, you could set it up at the webserver level, or use the experimental $wgCSPHeader at the MediaWiki level.

Privacy
One of the defining features of PeerTube is the usage of P2P technology when viewing videos. Viewers share pieces of the video with each other.

However, like BitTorrent, this means that the IP addresses of the viewers are revealed to others when watching the videos, as they need to connect with each other. If you're not comfortable with this, you can disable P2P on all embeds by adding the following to your LocalSettings.php after loading the extension: