EditedMediaItemSequence.Builder


class EditedMediaItemSequence.Builder


A builder for instances of EditedMediaItemSequence.

Summary

Public constructors

Builder(editedMediaItems: Array<EditedMediaItem!>!)

This function is deprecated.

Use Builder to create the builder, and addItems to add the EditedMediaItems, or use the static factory methods like withAudioFrom, withVideoFrom, or withAudioAndVideoFrom.

Builder(editedMediaItems: (Mutable)List<EditedMediaItem!>!)

This function is deprecated.

Use Builder to create the builder, and addItems to add the EditedMediaItems, or use the static factory methods like withAudioFrom, withVideoFrom, or withAudioAndVideoFrom.

Builder(trackTypes: (Mutable)Set<@C.TrackType Int!>!)

Creates an instance.

Public constructors

Builder

Builder(editedMediaItems: Array<EditedMediaItem!>!)

Builder

Builder(editedMediaItems: (Mutable)List<EditedMediaItem!>!)

Builder

Builder(trackTypes: (Mutable)Set<@C.TrackType Int!>!)

Creates an instance.

Parameters
trackTypes: (Mutable)Set<@C.TrackType Int!>!

The non-empty set of track types enabled for this sequence. Must only contain TRACK_TYPE_AUDIO and/or TRACK_TYPE_VIDEO. This determines which tracks will be included in this sequence's output. For example, passing a set containing only TRACK_TYPE_AUDIO will result in an audio-only sequence.

Public functions

addGap

@CanIgnoreReturnValue
fun addGap(durationUs: Long): EditedMediaItemSequence.Builder!

Adds a gap to the sequence.

A gap is a period of time with no media.

The gap's tracks match the trackTypes.

Parameters
durationUs: Long

The duration of the gap, in milliseconds.

Returns
EditedMediaItemSequence.Builder!

This builder, for convenience.

addItem

@CanIgnoreReturnValue
fun addItem(item: EditedMediaItem!): EditedMediaItemSequence.Builder!

Adds the item to the sequence.

Parameters
item: EditedMediaItem!

The EditedMediaItem to add.

Returns
EditedMediaItemSequence.Builder!

This builder, for convenience.

addItems

@CanIgnoreReturnValue
fun addItems(items: Array<EditedMediaItem!>!): EditedMediaItemSequence.Builder!

Adds the items to the sequence.

Parameters
items: Array<EditedMediaItem!>!

The EditedMediaItem instances to add.

Returns
EditedMediaItemSequence.Builder!

This builder, for convenience.

addItems

@CanIgnoreReturnValue
fun addItems(items: (Mutable)List<EditedMediaItem!>!): EditedMediaItemSequence.Builder!

Adds all the items in the list to the sequence.

Parameters
items: (Mutable)List<EditedMediaItem!>!

The list of EditedMediaItem instances to add.

Returns
EditedMediaItemSequence.Builder!

This builder, for convenience.

build

fun build(): EditedMediaItemSequence!

Builds the EditedMediaItemSequence.

There must be at least one item in the sequence.

setIsLooping

@CanIgnoreReturnValue
fun setIsLooping(isLooping: Boolean): EditedMediaItemSequence.Builder!

See isLooping.

Looping is false by default.

Parameters
isLooping: Boolean

Whether this sequence should loop.

Returns
EditedMediaItemSequence.Builder!

This builder, for convenience.