2
2
Fork
You've already forked PeerTubeEmbed
0
A PeerTube extension for MediaWiki. https://www.mediawiki.org/wiki/Extension:PeerTubeEmbed
  • PHP 100%
2024年08月13日 16:08:48 +02:00
i18n add @metadata field 2023年02月08日 21:07:59 +01:00
src Use htmlspecialchars directly 2024年08月13日 16:02:46 +02:00
CHANGELOG.md Update HtmlArmor's class name and ::getHtml's function name, add more PRs and commits 2024年01月26日 20:04:13 +01:00
CONTRIBUTING.md add "And aditionally" 2023年02月09日 12:55:28 +01:00
extension.json bump version 2024年01月26日 19:27:01 +01:00
LICENSE Initial commit 2023年01月02日 13:20:32 +00:00
README.md Correct PHP syntax errors in README 2023年05月01日 13:40:02 +02:00

PeerTubeEmbed

An extension for embedding PeerTube videos in MediaWiki articles.

Installation

Download the latest release from the Releases tab, then make a directory called PeerTubeEmbed in your extensions folder and uncompress it there.

Then add wfLoadExtension('PeerTubeEmbed'); to your LocalSettings.php file.

Usage

Simply put <peertube>URL</peertube> wherever you want the video to be embedded.

For example: <peertube>https://tilvids.com/w/vsMQtvP2Nc6dkKVue7dFt2</peertube>

Configuration

This extension has 3 configuration variables. You can add these to your LocalSettings.php file.

  • $wgPeerTubeEmbedDisableP2P: If set to true, disable P2P playback in embeds. Example: $wgPeerTubeEmbedDisableP2P = true;.
  • $wgPeerTubeEmbedHostFilterMode: Accepts one of two values, allow ($wgPeerTubeEmbedHostFilterMode = "allow";), which only creates the embed if the host is in the host filter, and deny ($wgPeerTubeEmbedHostFilterMode = "deny";), which refuses to create the embed if the host is in the host filter.
  • $wgPeerTubeEmbedHostFilterList: An array holding a list of domains. How this array is interpreted depends on what PeerTubeEmbedHostFilterMode is set to. To add entries add $wgPeerTubeEmbedHostFilterList[] = "DOMAINNAME.TLD"; on your LocalSettings.php. For example: $wgPeerTubeEmbedHostFilterList[] = "tilvids.com";.

See also $wgCSPHeader.

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.