Scene Recorder – JSON Structure & Rules
Datum
1. Overview
The Scene Recorder generates a list of scenes, each scene contains:
scrollTo: ID of the <section> element to scroll to at the start of the sceneduration: duration of the scene in seconds (automatically calculated)triggers: list of actions within the scene (text, audio, video)
Basic principle:
The first trigger of a scene starts the timeline (time: 0). All following triggers are relative to this scene time. Audio and video timings are always separate from the scene time.
2. Scene Structure
Example of a typical scene in JSON:
{
"scrollTo": "sectionID",
"duration": 8,
"triggers": [
{
"time": 0,
"text": "Here comes the text",
"audio": "../files/audio.mp3",
"audioStart": 0,
"audioEnd": 8,
"audioVolume": 0.8
},
{
"time": 2,
"video": "videoPlayer1",
"videoSrc": "../files/loop.mp4",
"loopVideo": true
}
]
}
Field explanations:
| Field | Meaning |
|---|---|
| scrollTo | ID of the <section> element for scene start |
| duration | Total duration of the scene in seconds, calculated as the longest trigger |
| triggers | List of actions within the scene |
| time | Time of the trigger relative to the scene start (0 = immediate) |
| text | Optional: text content of the trigger |
| audio | Optional: path to the audio file |
| audioStart | Start point within the audio file (seconds) |
| audioEnd | End point within the audio file (seconds, optional) |
| audioVolume | Volume (0–1), default 0.8 |
| video | Optional: ID of the <video> element |
| videoSrc | Video source URL |
| loopVideo | true/false – loop video or not |
| stopVideos | List of video IDs to stop |
3. Example – Immediate Audio Comment
Scenario: Scroll to textScene1, audio starts immediately, lasts 8 seconds, then the scene ends.
{
"scrollTo": "textScene1",
"duration": 8,
"triggers": [
{
"time": 0,
"text": "Mid-century armchair",
"audio": "../files/Dose-Commentary.mp3",
"audioStart": 0,
"audioEnd": 8,
"audioVolume": 0.8
}
]
}
time: 0→ starts immediately after scrollduration: 8→ ends after 8 seconds- Audio plays for exactly 8 seconds
- Scene can transition smoothly to the next scene
4. Rules for Correct Scenes
- First trigger = time 0 → avoids idle time at the start of the scene.
- Scene duration = longest trigger → audio or video duration determines scene end.
- Audio and video timings are separate →
time= when triggered in scene,audioStart/audioEnd= portion in audio file - Always scroll to
scrollTo→ ensures a clean scene entry. - Undo / editing → changes can be corrected in the recorder before export.
← Älter Neuer →







