Scene Recorder – JSON Structure & Rules

Datum

de-icon en-icon

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 scene
  • duration: 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:

FieldMeaning
scrollToID of the <section> element for scene start
durationTotal duration of the scene in seconds, calculated as the longest trigger
triggersList of actions within the scene
timeTime of the trigger relative to the scene start (0 = immediate)
textOptional: text content of the trigger
audioOptional: path to the audio file
audioStartStart point within the audio file (seconds)
audioEndEnd point within the audio file (seconds, optional)
audioVolumeVolume (0–1), default 0.8
videoOptional: ID of the <video> element
videoSrcVideo source URL
loopVideotrue/false – loop video or not
stopVideosList 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 scroll
  • duration: 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 separatetime = 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 →