Capítulo 891 de 988

Chapter 891: getLottieMetadata()

Core Idea

_Part of the @remotion/lottie package.

Key Concepts

  • API
  • Return value
  • height
  • width
  • durationInSeconds
  • durationInFrames
  • fps
  • See also

Code Examples

// @allowUmdGlobalAccess
// @filename: animation.ts
export const animationData = {
  v: "5.9.6",
  fr: 29.9700012207031,
  ip: 0,
  op: 90.0000036657751,
  w: 1920,
  h: 1080,
  nm: "Comp 1",
  ddd: 0,
  assets: [],
  layers: [
    {
      ddd: 0,
      ind: 1,
      ty: 4,
      nm: "Shape Layer 1",
      sr: 1,
      ks: {
        o: { a: 0, k: 100, ix: 11 },
        r: {
          a: 1,
          k: [
            {
              i: { x: [0.833], y: [0.833] },
              o: { x: [0.167], y: [0.167] },
              t: 0,
              s: [360],
            },
            { t: 58.0000023623884, s: [0] },
          ],
          ix: 10,
        },
        p: {
          a: 1,
          k: [
            {
              i: { x: 0.833, y: 0.833 },
              o: { x: 0.167, y: 0.167 },
              t: 0,
              s: [979.401, 1368, 0],
              to: [0, -138, 0],
              ti: [0, 138, 0],
            },
            { t: 58.0000023623884, s: [979.401, 540, 0] },
          ],
          ix: 2,
          l: 2,
        },
        a: { a: 0, k: [517.365, 112.096, 0], ix: 1, l: 2 },
        s: { a: 0, k: [100, 100, 100], ix: 6, l: 2 },
      },
      ao: 0,
      shapes: [
        {
          ty: "gr",
          it: [
            {
              ty: "rc",
              d: 1,
              s: { a: 0, k: [425.883, 425.883], ix: 2 },
              p: { a: 0, k: [0, 0], ix
// ...(truncated)
  • What it demonstrates: Usage pattern for getLottieMetadata() from the official docs.

Key Takeaways

  1. Understand api when working with getLottieMetadata().
  2. Understand return value when working with getLottieMetadata().
  3. Understand height when working with getLottieMetadata().
  4. Understand width when working with getLottieMetadata().
  5. Understand durationinseconds when working with getLottieMetadata().

Connects To

  • Lottie: related page in the Lottie (@remotion/lottie) section.
  • Lottiefiles: related page in the Lottie (@remotion/lottie) section.
  • Remote: related page in the Lottie (@remotion/lottie) section.