定制 herrthees/kirby-peertube 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

herrthees/kirby-peertube

最新稳定版本:1.1.1

Composer 安装命令:

composer require 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.

README 文档

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

  1. Download the plugin
  2. 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

ParameterTypeDefaultDescription
autoplaybooleanfalseAuto-play video (video will be muted)
mutedbooleanfalseStart video muted
loopbooleanfalseLoop the video
controlsbooleantrueShow video controls
startinteger-Start time in seconds
endinteger-End time in seconds
p2pboolean-Enable P2P streaming
titlebooleantrueShow/Hide embed title.
warningtitlebooleantrueShow/Hide P2P warning title.
subtitlestring-Subtitle language
widthstring100%Container width
heightstring400Container height
classstringpeertube-videoCSS 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-id
  • https://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

Credits

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

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: AGPL-3.0-or-later
  • 更新时间: 2025-10-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固