GitHub

Layer configuration

Timeline

The Timeline config allows you to specify the time at which your layer becomes visible by specifying a start attribute. If left unset, the start will default to 0.

Interface

interface Timeline {
  timeline?: {
    // seconds from the start of the video
    // to start the layer. defaults to 0
    start?: number;
  };
}

Configuring Timeline

You can modify a layer's timeline-related settings by passing a configuration object or by calling its setters. You can read the layer's timeline-related settings by calling its getters

Configuration Object

const video = await composition.addVideo(
  "https://editframe.com/docs/layer-configuration/timeline/fire-short.mp4",
  {
    timeline: {
      start: 0.75,
    },
  }
);

Output

Setters

setStart

const video = await composition.addVideo(
  "https://editframe.com/docs/layer-configuration/timeline/fire-short.mp4"
);


video.setStart(0.75);

Output

Getters

video.start; // -> 0.75
Previous
Size