herrthees / kirby-peertube
A Kirby CMS plugin to embed PeerTube videos using a simple KirbyTag. Supports autoplay, custom start/end times, and works with any PeerTube instance.
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Type:kirby-plugin
pkg:composer/herrthees/kirby-peertube
Requires
- php: >=8.1
- getkirby/composer-installer: ^1.2
Requires (Dev)
- getkirby/cms: ^5.0
This package is not auto-updated.
Last update: 2025-12-03 18:26:40 UTC
README
A plugin for Kirby CMS to easily embed PeerTube videos using a KirbyTag.
Deutsch | English
Features
- Embed PeerTube videos with a simple KirbyTag
- Responsive embed with 16:9 aspect ratio
- Support for autoplay, muting, loop and more
Requirements
- Kirby 5+
- PHP 8.1+
Installation
Manual Installation
- Download the plugin
- Extract to
/site/plugins/peertube
The folder structure should look like this:
site/
plugins/
peertube/
index.php
Composer (coming soon)
composer require herrthees/kirby-peertube
Usage
Basic Usage
(peertube: https://peertube.example.com/videos/watch/abc123-def456)
With Parameters
(peertube: https://peertube.example.com/videos/watch/abc123-def456
autoplay: true
start: 30)
Available Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
autoplay | boolean | false | Auto-play video (video will be muted) |
muted | boolean | false | Start video muted |
loop | boolean | false | Loop the video |
controls | boolean | true | Show video controls |
start | integer | - | Start time in seconds |
end | integer | - | End time in seconds |
p2p | boolean | - | Enable P2P streaming |
title | boolean | true | Show/Hide embed title. |
warningtitle | boolean | true | Show/Hide P2P warning title. |
subtitle | string | - | Subtitle language |
width | string | 100% | Container width |
height | string | 400 | Container height |
class | string | peertube-video | CSS class prefix |
Examples
Autoplay with Muting
Note: Modern browsers require muting for autoplay. The plugin automatically mutes videos when autoplay is enabled.
(peertube: https://peertube.example.com/videos/watch/abc123 autoplay: true)
Start at Specific Time
(peertube: abc123-def456 start: 60)
Or with minutes and seconds:
(peertube: abc123-def456 start: 2m15s)
Loop Video
(peertube: abc123-def456 loop: true)
Combining Multiple Options
(peertube: https://peertube.example.com/videos/watch/abc123-def456
autoplay: true
loop: true
start: 30
end: 90)
Supported URL Formats
The plugin recognizes the following PeerTube URL formats:
https://peertube.example.com/videos/watch/video-idhttps://peertube.example.com/w/video-id
Output
The plugin generates a responsive iframe embed:
<div class="peertube-video-wrapper" style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%;">
<iframe
src="https://peertube.example.com/videos/embed/video-id"
title="PeerTube-Video"
frameborder="0"
allowfullscreen
sandbox="allow-same-origin allow-scripts allow-popups allow-forms"
style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;">
</iframe>
</div>
Browser Autoplay Policies
Modern browsers have strict autoplay policies - autoplay only works with muted videos. The plugin handles this automatically by muting videos when autoplay is enabled (can be manually unmuted by the user).
Contributing
This is my first Kirby plugin. Suggestions and improvements are welcome. Please submit a pull request.
Report Issues
For issues, please report on:
Support
- Kirby Plugin Documentation: getkirby.com/docs/reference/plugins
- Kirby Forum: forum.getkirby.com
- PeerTube Documentation: docs.joinpeertube.org
Credits
- Author: Ralf Thees
- Website: herrthees.de
- Mastodon: @herrthees@wue.social
License
AGPL-3.0-or-later
See LICENSE for the full license text.
Created for the Kirby CMS community
README created locally with assistance from Gemma3:27b-AI