Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 16 additions & 31 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
### 6.1.0 pl - *12. May 2026*
* Added SRF / SRG SSR adapter (Swiss Radio and Television)
- Supports share URLs with `?urn=` query parameter
- Supports `/redirect/detail/UUID` path format
- Supports plain URNs (`urn:srf:video:UUID`) and plain UUIDs
- Sister channels: RTS, RTR, RSI, SWI — detected by domain
- Thumbnail fetched from SRG SSR Integration Layer API
- SRF listed first in the default `processors` pipeline
* Adopted adapter architecture from upstream Videobox-MODX (HitkoDev)
* Removed hardcoded `$_GET['dev']` debug paths from `loadAssets()`
* Added graceful fallback when `overrides.min.css` is missing
* Build script updated for CLI execution (pre-defines URL constants)
* Default player dimensions changed to 960×540 (16:9)
* Added README.md and CHANGELOG.md to transport package attributes

### 6.0.0 rc 7 - *20. December 2016*
* customise nothumb colour
* fix HTML5 player template
Expand All @@ -20,7 +35,7 @@

### 6.0.0 rc 3 - *19. November 2016*
* fix bug with missing / inaccessible thumbnails
* fix bug with loading Videobox in ```<head>```
* fix bug with loading Videobox in `<head>`
* add missing thumbnail images

### 6.0.0 rc 2 - *14. November 2016*
Expand All @@ -47,42 +62,12 @@
* reduce animation flickering
* update dependencies
* recompile CSS with better backwards compatibility
* update the README file

### 5.0.0 rc 5 - *8. May 2016*
* fix bug with PHP-GD
* update dependencies

### 5.0.0 rc 4 - *28. April 2016*
* fix slider bug
* allow users to modify the UI colour

### 5.0.0 rc 3 - *29. March 2016*
* updated core
* bug fixes

### 5.0.0 rc 2 - *22. March 2016*
* code fixes and optimisations

### 5.0.0 rc 1 - *14. March 2016*
* added Twitch adapter

### 5.0.0 beta 4 - *7. March 2016*
* moved to TS and SASS
* bug fixes
* updated HTML5 player
* added root option for Videobox player (pop-up is now appended to options.root, which should be the default scroll wrap)
* improved overall performance

### 5.0.0 beta 3 - *4. February 2016*
* js optimisation
* bug fixes
* HTML5 player

### 5.0.0 beta 2 - *17. December 2015*
* moved from CSS transitions to Web Animations for better performance
* bug fixes

### 5.0.0 beta 1 - *28. October 2015*
* initial release

140 changes: 123 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,123 @@
<img src="https://cloud.githubusercontent.com/assets/4700881/10467953/b5fb0616-71fc-11e5-9847-0e2afd05ff1f.png" alt="videobox logo" width="200" align="right">
#[Videobox - a lightweight video player and gallery](https://hitko.eu/videobox)
Videobox is a MODX extension for adding video and audio to your site. It supports videos from YouTube and Vimeo, as well as music from SoundCloud, Twitch videos and streams, and HTML5 supported video and audio formats. There are many ways to insert a video player in the content, including the standard video player, a pop-up player, expanding inline player, or a gallery of videos. All you have to do is put ```[[Videobox? &videos=`XfSfK8AkGVo`]]``` and you get a beautiful responsive video player.

###Demo
If you want to see Videobox in action, check out the [demo page](https://hitko.eu/videobox)

###Basic options
The example above uses a single YouTube video ID, but Videobox can do much more. Below is an example of the full video syntax, including start and end time, video title, and multiple videos. Check out the [Getting started guide](https://hitko.eu/videobox/getting-started/#htk-videobox-for-modx) for a detailed explanation of the syntax, and [Videobox documentation](https://hitko.eu/videobox/documentation/) for a guide on the parameters you can use.

```
m--HWCQq5Ew#0:30-1:50|Alestorm ft. Lady Gaga - Magnetic Telephone|,
cTtka7r62V8|Soilwork - The Ride Majestic|,
mIegk9Ukx4k|Kontrust - Just Propaganda|,
FANEejDEvCA|Justin Hayward - The Story In Your Eyes|,
4auH5kwmd_Y|Kataklysm - The Black Sheep
```
# Videobox MODX Extra

A MODX Revolution Extra that wraps the [Videobox JS library](https://github.com/HitkoDev/Videobox) and provides a flexible video embedding system with server-side thumbnail generation, multiple display modes, and an extensible adapter architecture.

## Features

- **SRF / SRG SSR** — Swiss public broadcasting (SRF, RTS, RTR, RSI, SWI)
- **YouTube** — watch URLs, short links (youtu.be), plain video IDs
- **Vimeo** — video URLs and plain IDs
- **SoundCloud** — track URLs
- **Twitch** — channel and VOD URLs
- **HTML5 / local files** — with automatic format conversion via FFmpeg
- **Server-side thumbnail generation** — GD or Imagick, with caching
- **Display modes** — inline player, lightbox, box, thumbnail gallery, slider, text links
- **Pagination** for large galleries
- **Color theming** — configurable accent colours applied via CSS overrides
- **MODX cache integration**

## Requirements

- MODX Revolution 2.6+ or MODX 3.x
- PHP 7.4+
- GD or Imagick extension (for thumbnail generation)

## Installation

**Option A — Package Manager**
1. Copy `videobox-6.1.0-pl.transport.zip` into `core/packages/` on your MODX site.
2. Manager → Extras → Installer → Search Locally for Packages.
3. Install **Videobox 6.1.0**.

**Option B — Build from source**
```bash
cp _build/build.config.sample.php _build/build.config.php
# edit _build/build.config.php to match your MODX installation
php _build/build.transport.php
```

## Basic usage

```
[[Videobox? &videos=`https://www.srf.ch/play/tv/-/video/-?urn=urn:srf:video:608cc6ac-2262-4bfb-98ce-d04f58df5438|Tagesschau`]]
[[Videobox? &videos=`https://www.srf.ch/play/tv/redirect/detail/acedb774-8d9c-43f1-9a12-26a9a31083ff|My SRF Video`]]
[[Videobox? &videos=`https://www.youtube.com/watch?v=dQw4w9WgXcQ|Never Gonna Give You Up`]]
[[Videobox? &videos=`KKWTdo5YW_I|YouTube by ID`]]
[[Videobox? &videos=`https://vimeo.com/123456789|Vimeo video`]]
```

### Multiple videos (gallery)

```
[[Videobox?
&videos=`urn:srf:video:608cc6ac-2262-4bfb-98ce-d04f58df5438|Tagesschau|,
https://www.youtube.com/watch?v=dQw4w9WgXcQ|YouTube clip`
&display=`gallery`
&tWidth=`480`
&tHeight=`270`
]]
```

## Video input format

The `&videos` parameter accepts a pipe-delimited list of entries separated by `|,`:

```
ID_or_URL|Optional Title#start-end|,ID_or_URL|Title
```

- `|` separates ID/URL from the title
- `#start` / `#start-end` add time offsets (e.g. `#1:30-2:45`)
- `|,` separates multiple videos in one call

## Snippet parameters

| Parameter | Default | Description |
|---|---|---|
| `videos` / `video` | — | Video IDs, URLs, or pipe-delimited list |
| `display` | auto | `player` · `box` · `links` · `gallery` · `slider` |
| `player` | `videobox` | `videobox` (lightbox) · `vbinline` (inline) |
| `singleDisplay` | `player` | Default display for a single video |
| `multipleDisplay` | `gallery` | Default display for multiple videos |
| `pWidth` | `960` | Player width in px |
| `pHeight` | `540` | Player height in px |
| `tWidth` | `480` | Thumbnail width in px |
| `tHeight` | `360` | Thumbnail height in px |
| `perPage` | `12` | Gallery items per page (0 = all) |
| `processors` | `SRF, Twitch, YouTube, Vimeo, SoundCloud, HTML5` | Adapter pipeline |
| `color` | `50bf82` | Player accent colour (hex) |
| `tColor` | `005723` | UI text colour (hex) |
| `hColor` | `50bf82` | UI hover colour (hex) |
| `bgColor` | `00a645` | Placeholder thumbnail colour (hex) |
| `cache` | `true` | Enable output and thumbnail caching |
| `boxTpl` | `vb.boxTpl` | Chunk for box display |
| `galleryTpl` | `vb.galleryTpl` | Chunk for gallery wrapper |
| `galleryItemTpl` | `vb.galleryItemTpl` | Chunk for gallery item |
| `thumbTpl` | `vb.thumbTpl` | Chunk for thumbnail link |
| `linkTpl` | `vb.linkTpl` | Chunk for text link |
| `playerTpl` | `vb.playerTpl` | Chunk for inline player |
| `sliderTpl` | `vb.sliderTpl` | Chunk for slider wrapper |
| `sliderItemTpl` | `vb.galleryItemTpl` | Chunk for slider item |

## Supported SRF URL formats

| Input | Resolved embed URL |
|---|---|
| `https://www.srf.ch/play/tv/-/video/-?urn=urn:srf:video:UUID` | `https://www.srf.ch/play/embed?urn=urn:srf:video:UUID` |
| `https://www.srf.ch/play/tv/redirect/detail/UUID` | `https://www.srf.ch/play/embed?urn=urn:srf:video:UUID` |
| `urn:srf:video:UUID` | `https://www.srf.ch/play/embed?urn=urn:srf:video:UUID` |
| `UUID` (plain) | `https://www.srf.ch/play/embed?urn=urn:srf:video:UUID` |

SRG SSR sister channels (RTS, RTR, RSI, SWI) follow the same patterns on their respective domains.

## Adapters

Each platform is implemented as a pair of files:
- `core/components/videobox/model/adapters/{name}.class.php` — the adapter class
- `core/components/videobox/elements/snippets/snippet.{name}.php` — the MODX processor snippet

To add a custom adapter, create both files and add the snippet name to the `&processors` parameter.

## License

GPL-3.0 — same as the upstream [Videobox JS library](https://github.com/HitkoDev/Videobox).
Loading