Caspar Template
All checks were successful
Build & Push Docker (latest) / verify (push) Successful in 9m29s
Build & Push Docker (latest) / build (push) Successful in 8s

This commit is contained in:
Aiden Wilson
2026-05-29 22:51:32 +10:00
parent a88306aec7
commit bba1ab5cee
6 changed files with 375 additions and 4 deletions

View File

@@ -65,9 +65,37 @@ The service also supports the oembed.link-style form:
http://localhost:3000/https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdQw4w9WgXcQ
```
## CasparCG template
Load `/caspar` as the browser template URL. It starts transparent and blank, then
renders when CasparCG sends `UPDATE` data.
Example template URL:
```txt
http://localhost:3000/caspar
```
Example JSON update payload:
```json
{
"url": "https://bsky.app/profile/bsky.app/post/3k...",
"width": 1920,
"height": 1080,
"scale": 1,
"transparent": true
}
```
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`.
## API
- `GET /api/oembed?url=...` returns the matched provider and raw oEmbed data.
- `GET /caspar` returns the CasparCG update-driven HTML template.
- `GET /providers` returns the loaded provider patterns.
- `GET /healthz` returns a health check response.