video()

Purpose: Spawn and control HTML5 video overlays during a score.

Required

File Resolution

Videos are resolved in order:

  1. Project video directory: scores/<project>/video/<filename>
  2. Shared video directory: shared/video/<filename>

Placement & Positioning

Size

Audio (Default Muted)

Spawning / Reuse

Timing & Playback

Modal / UI Features

Interaction

Removal


Examples

  1. Fullscreen, pass-through clicks, but allow click-to-close

    cue:video(file:intro.mp4,size:fs,clickable:1,audio:1,fadeIn:0.5)
    
  2. Windowed, anchored to a target, follows scroll, infinite loop

    cue:video(file:clip.webm,target:markerA,location:scroll,size:640x360,loop:0,opacity:0.9)
    
  3. Spawn a second independent instance via uid

    cue:video(file:cam.mp4,uid:stageLeft,in:5,fadeIn:1,fadeOut:1,hold:20)
    
  4. Force new instance without specifying uid

    cue:video(file:teaser.mp4,new:1,in:2,out:10,fadeIn:0.5,fadeOut:0.5,speed:1.25)
    
  5. Modal video with close button and backdrop

    cue:video(file:tutorial.mp4,w:960,h:540,location:fixed,closeBtn:1,backdrop:1,controls:1,fadeIn:0.3)
    
  6. Clickable SVG element that triggers a modal video

    Use button() with mode:overlay to make an SVG element trigger a video while keeping the SVG visible:

    <g id="button(trigger:video(file:tutorial.mp4,w:960,h:540,location:fixed,closeBtn:1,backdrop:1),mode:overlay,tooltip:Tutorial)">
      <rect x="0" y="0" width="50" height="48" rx="4" style="fill:#4a90d9"/>
      <text x="25" y="35" style="text-anchor:middle;fill:#fff">?</text>
    </g>
    

Note: size:fs always positions at (0,0) and ignores target geometry; all other sizes center on target (or the cue position) with optional offsetX/offsetY. Default audio is muted; use audio:1 to unmute. By default, same file+target cues reuse the existing element unless uid or new:1 is supplied.

Tip: use ← → or ↑ ↓ to navigate the docs