Layers

Video Layer

Video layers display video content with playback controls, looping, and speed adjustment. Videos play automatically when the layer is visible.

Example

video-layer.json
{
  "type": "video",
  "id": "video-1",
  "name": "Background Video",
  "visible": true,
  "locked": false,
  "mediaUrl": "https://example.com/video.mp4",
  "objectFit": "cover",
  "focalPoint": { "x": 0.5, "y": 0.5 },
  "mediaScale": 1,
  "loop": true,
  "playbackSpeed": 1,
  "brightness": 1,
  "contrast": 1,
  "saturation": 1,
  "borderRadius": 0,
  "transform": {
    "x": 0,
    "y": 0,
    "width": 1,
    "height": 1,
    "rotation": 0,
    "opacity": 1
  }
}

Properties

PropertyTypeDefaultDescription
mediaUrlstringrequiredURL of the video file
objectFitstring"cover""cover" | "contain" | "stretch"
focalPointobject{x: 0.5, y: 0.5}Focus point for cover mode (0-1)
mediaScalenumber1Zoom level (1 = fit, >1 = zoom in)
loopbooleantrueWhether video loops automatically
playbackSpeednumber1Playback rate (0.25-4, 1 = normal)
brightnessnumber1Brightness (0-2, 1 = normal)
contrastnumber1Contrast (0-2, 1 = normal)
saturationnumber1Saturation (0-2, 1 = normal)
borderRadiusnumber0Corner radius in pixels

Playback Behavior

  • Videos auto-play when the layer becomes visible
  • Audio is muted by default
  • Looping is enabled by default for seamless backgrounds
  • Playback speed can range from 0.25x (slow motion) to 4x (fast forward)

Supported Formats

  • MP4 (.mp4) - H.264 codec recommended
  • WebM (.webm) - VP8/VP9 codec
  • MOV (.mov) - QuickTime format