# alta.cinematics/0.1: trailers and scenes

<p class="generated-note">Generated from <a href="https://github.com/altasystem-ai/alta/blob/main/docs/standards/alta-cinematics-0.1.md"><code>docs/standards/alta-cinematics-0.1.md</code></a> · <code>npm run docs:gen</code></p>

Code: [`core/cinematics/cinematics.ts`](https://docs.altasystem.ai/reference/advanced/core-api/cinematics-cinematics). Tests: [`tests/contracts.test.ts`](https://github.com/altasystem-ai/alta/blob/main/tests/contracts.test.ts). Files: `universes/<id>/cinematics.json`,
fallback [`content/cinematics.json`](https://github.com/altasystem-ai/alta/blob/main/content/cinematics.json) (both loaded by [`client/app/universes.ts`](https://github.com/altasystem-ai/alta/blob/main/client/app/universes.ts); absent files are fine).

Status: **alpha**. This format can still change before its 1.0; a change follows the versioning rules of the project and is announced in the changelog.

```
Cinematics { schema, trailer?, quests?: { uid: { intro?, outro? } }, types?: { questType: sceneId },
             items?: { itemId: sceneId }, scenes: { id: Cutscene } }
Cutscene   { title, recap: Text[] (required), video?, page?, shots?: Shot[] }
Shot       card {dur, title?, text?} | pan {dur, to: entityId|"centre"|"edge"|"wide", zoom?}
           | line {dur, who?: agent role, text} | fx {dur, name: burst|flash|rings|letterbox} | reveal {dur, entity}
```

A scene plays its video if it can, else its page (same origin, in a frame), else its shots, else its recap
(`playMode`). "Skip" always shows the recap. A scene seen (`Save.seen`) never plays again by itself.
`outroOf(uid, type, cin, legacy)` picks a quest's outro: the quest's own, else its type's, else the legacy table.

`checkCinematics(c, questUids, entityKinds, entityIds?)` refuses: unknown quest, type or scene references; a scene
without recap; `video` that is neither a served path nor https; `page` not same-origin; unknown shot kinds or fx;
a scene longer than `MAX_SCENE_S` (120 s). Shot kinds beyond the five are drawn by `registerShot` (client).
