Skip to content

<SpeedKey> ​

Changes its clip's speed from a moment on, eased: speed ramps.

tsx
import { Clip, Composition, SpeedKey, Track } from "@cutcraft/kit";

export default function Video() {
  return (
    <Composition fps={30} width={960} height={540}>
      <Track id="main">
        {/* Normal speed, easing into a four-times speed-up. */}
        <Clip id="ramp" src="asset:cells" in={0} out={8} fit="cover">
          <SpeedKey id="s0" at={0} speed={1} />
          <SpeedKey id="s1" at={1} speed={4} easing="easeInOutQuad" />
        </Clip>
      </Track>
    </Composition>
  );
}

Props ​

proptypedefaultrequireddescription
idstringyesThe key's name.
atnumber (0..∞)yesSeconds into the clip where the new speed is reached.
speednumber (0.1..20)yesThe playback rate from here on: 2 is twice as fast.
easing"linear" | "ease" | "ease-in" | "ease-out" | "ease-in-out" | … 46 more"linear"How the speed changes from the key before to this one.

No children. All elements

MIT licensed.