EditedMediaItemSequence.Builder


public final class EditedMediaItemSequence.Builder


A builder for instances of EditedMediaItemSequence.

Summary

Public constructors

Builder(EditedMediaItem[] editedMediaItems)

Creates an instance.

Builder(List<EditedMediaItem> editedMediaItems)

Public constructors

Builder

public Builder(EditedMediaItem[] editedMediaItems)

Creates an instance.

Builder

public Builder(List<EditedMediaItem> editedMediaItems)

Public methods

addGap

@CanIgnoreReturnValue
public EditedMediaItemSequence.Builder addGap(long durationUs)

Adds a gap to the sequence.

A gap is a period of time with no media.

Gaps are only supported in sequences of audio.

Parameters
long durationUs

The duration of the gap, in milliseconds.

Returns
EditedMediaItemSequence.Builder

This builder, for convenience.

addItem

@CanIgnoreReturnValue
public EditedMediaItemSequence.Builder addItem(EditedMediaItem item)

Adds the item to the sequence.

Parameters
EditedMediaItem item

The EditedMediaItem to add.

Returns
EditedMediaItemSequence.Builder

This builder, for convenience.

addItems

@CanIgnoreReturnValue
public EditedMediaItemSequence.Builder addItems(EditedMediaItem[] items)

Adds the items to the sequence.

Parameters
EditedMediaItem[] items

The EditedMediaItem instances to add.

Returns
EditedMediaItemSequence.Builder

This builder, for convenience.

addItems

@CanIgnoreReturnValue
public EditedMediaItemSequence.Builder addItems(List<EditedMediaItem> items)

Adds all the items in the list to the sequence.

Parameters
List<EditedMediaItem> items

The list of EditedMediaItem instances to add.

Returns
EditedMediaItemSequence.Builder

This builder, for convenience.

build

public EditedMediaItemSequence build()

Builds the EditedMediaItemSequence.

There must be at least one item in the sequence.

setIsLooping

@CanIgnoreReturnValue
public EditedMediaItemSequence.Builder setIsLooping(boolean isLooping)

See isLooping.

Looping is false by default.

Parameters
boolean isLooping

Whether this sequence should loop.

Returns
EditedMediaItemSequence.Builder

This builder, for convenience.