Skip to main content

createSmoothSvgPath()

Part of the @remotion/media-utils package of helper functions.

This function takes points, usually generated from visualizeAudioWaveform() or visualizeAudio(), and adds SVG C (curve) statements inbetween them to create a smooth path.

Example

import {createSmoothSvgPath} from '@remotion/media-utils';
import React from 'react';

const points = [
  {x: 0, y: 0},
  {x: 100, y: 100},
  {x: 200, y: 50},
  {x: 300, y: 150},
];

const path = createSmoothSvgPath({points});

See a practical example here.

See also