Skip to content

AudioConfig

AudioConfig = object

Defined in: audio.ts:29

Display/playback options for a background audio track.

Background audio is mixed under the recording (and any narration). Unlike overlays it has no visual and never freezes a frame: it simply plays from the point it is started until it is ended (or until the end of the video).

path: string

Defined in: audio.ts:32

File path to an audio file: .mp3, .wav, .m4a, .aac, .ogg, .flac, .opus, or an audio-only .mp4.


optional repeat?: boolean

Defined in: audio.ts:44

Loop the source to fill the playback span. With repeat: true a short track repeats until the track is ended (or the video ends). Defaults to false (the source plays once and then falls silent).


optional speed?: number

Defined in: audio.ts:52

Playback-rate multiplier. 2 plays the track twice as fast, 0.5 at half speed; 1 (the default) is the natural rate. Works like speed for a recording. The track keeps its output span (it never freezes a frame or shifts the recording); only the source is consumed faster or slower. Mutually exclusive with time.


optional time?: number

Defined in: audio.ts:58

Target playback duration (ms), an alternative to speed: the source is sped up or slowed down so it plays over exactly this long. Works like time for a recording. Mutually exclusive with speed.


optional volume?: number

Defined in: audio.ts:38

Linear gain. 1 (the default) plays the source at its natural level, 0 mutes it, and values above 1 boost it (e.g. 2 is twice as loud). Capped at MAX_AUDIO_LEVEL.