定制 herrthees/kirby-peertube 二次开发

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

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

herrthees/kirby-peertube

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

herrthees/kirby-peertube 适用场景与选型建议

herrthees/kirby-peertube 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 10 月 07 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「video」 「embed」 「federated」 「kirby」 「kirby-plugin」 「kirbytag」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 herrthees/kirby-peertube 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 herrthees/kirby-peertube 我们能提供哪些服务?
定制开发 / 二次开发

基于 herrthees/kirby-peertube 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

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