This commit is contained in:
Aiden Wilson
2026-05-29 23:19:20 +10:00
parent bba1ab5cee
commit 4b488913e4
5 changed files with 449 additions and 18 deletions

View File

@@ -92,10 +92,40 @@ The template also accepts a raw URL string or standard CasparCG XML
`templateData` with component ids such as `url`, `scale`, `fit`, `autoplay`,
`muted`, `readyDelay`, and `maxWait`.
## Collage
Use `/collage` to render multiple social posts as a vertically scrolling strip.
Posts are repeated in the track so the motion keeps filling gaps.
Repeated `url` parameters:
```txt
http://localhost:3000/collage?url=https%3A%2F%2Fbsky.app%2F...&url=https%3A%2F%2Fx.com%2F...
```
Or a JSON array:
```txt
http://localhost:3000/collage?urls=%5B%22https%3A%2F%2Fbsky.app%2F...%22%2C%22https%3A%2F%2Fx.com%2F...%22%5D
```
Useful collage parameters:
- `spacing`: pixels between a post and anything else, including screen edges and other posts, default `48`.
- `fade`: optional pixels used to fade posts in/out at the top and bottom edges, default `0`.
- `columns`: number of post columns, default `3`.
- `duration`: seconds per scroll loop, default `360`.
- `repeat`: number of times to repeat the post list in each half of the loop, default `4`.
- `shuffle`: `1` to randomize post order on each page load, default `1`.
Collage card width is calculated from `width`, `spacing`, and `columns`,
then capped at `500px`, so all columns fit within the configured screen width.
## API
- `GET /api/oembed?url=...` returns the matched provider and raw oEmbed data.
- `GET /caspar` returns the CasparCG update-driven HTML template.
- `GET /collage?url=...&url=...` returns a scrolling social post collage.
- `GET /providers` returns the loaded provider patterns.
- `GET /healthz` returns a health check response.