TrackBuilder

class TrackBuilder(content: TrackContent = TrackContent.AudioAndVideo)(source)

Builds one Track.

Parameters

content

Which media streams this track contributes.

Constructors

Link copied to clipboard
constructor(content: TrackContent = TrackContent.AudioAndVideo)

Functions

Link copied to clipboard

Appends an already-built clip.

Link copied to clipboard

Adds already-built track effects.

Link copied to clipboard

Sets what happens to this track's audio before it is mixed.

Link copied to clipboard
fun build(): Track

Freezes what has been described.

Link copied to clipboard
fun clip(source: MediaSource, block: ClipBuilder.() -> Unit = {}): TrackBuilder

Appends a clip reading from source, configured by block.

Link copied to clipboard

Adds effects that apply to every clip on this track, after each clip's own.

Link copied to clipboard
fun fadeIn(duration: Duration): TrackBuilder

Ramps this track's audio up from silence over duration, starting where the track does.

Link copied to clipboard
fun fadeOut(duration: Duration): TrackBuilder

Ramps this track's audio down to silence over the duration before it ends.

Link copied to clipboard
fun image(image: ImageSource, duration: Duration, block: ClipBuilder.() -> Unit = {}): TrackBuilder

Appends a still image, held for duration and configured by block.

Link copied to clipboard
fun looping(looping: Boolean = true): TrackBuilder

Repeats the track until the longest non-looping one ends.

Link copied to clipboard

Holds the track off until start into the composition.