chao2hang/flarum-xgplayer
Composer 安装命令:
composer require chao2hang/flarum-xgplayer
包简介
Integrate XgPlayer (ByteDance video player) into Flarum posts with support for MP4, HLS, FLV and DASH formats.
README 文档
README
A Flarum extension that integrates XgPlayer (ByteDance video player) into forum posts.
Features
- Embed videos using BBCode:
[xgplayer url=URL poster=URL type=TYPE] - Supports multiple video formats: MP4, HLS (.m3u8), FLV, DASH
- Editor toolbar button with video insertion modal
- Picture-in-Picture (PiP) support
- Fullscreen with auto-rotate on mobile
- Mobile-optimized progress bar and controls
- Lazy CDN loading (scripts loaded only when needed)
Installation
composer require chaos/xigua-video
Then enable the extension in Flarum admin panel.
Usage
BBCode
[xgplayer url=https://example.com/video.mp4]
[xgplayer url=https://example.com/video.m3u8 type=hls]
[xgplayer url=https://example.com/video.mp4 poster=https://example.com/thumb.jpg]
Editor Button
Click the Video button in the post editor toolbar to open the video insertion modal.
Supported Formats
| Format | Type | Description |
|---|---|---|
| MP4 | mp4 |
Standard video format (default) |
| HLS | hls |
HTTP Live Streaming (.m3u8) |
| FLV | flv |
Flash Video |
| DASH | dash |
Dynamic Adaptive Streaming |
Requirements
- Flarum
^2.0 - PHP 8.x
Configuration
No configuration needed. The extension uses XgPlayer CDN by default.
Links
License
MIT
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-06-21