MediaItem.ClippingConfiguration.Builder


class MediaItem.ClippingConfiguration.Builder


Builder for ClippingConfiguration instances.

Summary

Public constructors

Creates a new instance with default values.

Public functions

MediaItem.ClippingConfiguration!

Returns a ClippingConfiguration instance initialized with the values of this builder.

MediaItem.ClippingProperties!

This function is deprecated.

Use build instead.

MediaItem.ClippingConfiguration.Builder!

Sets the optional end position in milliseconds which must be a value larger than or equal to zero, or TIME_END_OF_SOURCE to end when playback reaches the end of media (Default: TIME_END_OF_SOURCE).

MediaItem.ClippingConfiguration.Builder!

Sets the optional end position in milliseconds which must be a value larger than or equal to zero, or TIME_END_OF_SOURCE to end when playback reaches the end of media (Default: TIME_END_OF_SOURCE).

MediaItem.ClippingConfiguration.Builder!

Sets whether the start position and the end position are relative to the default position in the window (Default: false).

MediaItem.ClippingConfiguration.Builder!

Sets whether the start/end positions should move with the live window for live streams.

MediaItem.ClippingConfiguration.Builder!
@CanIgnoreReturnValue
setStartPositionMs(startPositionMs: @IntRange(from = 0) Long)

Sets the optional start position in milliseconds which must be a value larger than or equal to zero (Default: 0).

MediaItem.ClippingConfiguration.Builder!

Sets the optional start position in microseconds which must be a value larger than or equal to zero (Default: 0).

MediaItem.ClippingConfiguration.Builder!

Sets whether the start point is guaranteed to be a key frame.

Public constructors

Builder

Builder()

Creates a new instance with default values.

Public functions

build

fun build(): MediaItem.ClippingConfiguration!

Returns a ClippingConfiguration instance initialized with the values of this builder.

buildClippingProperties

@UnstableApi
fun buildClippingProperties(): MediaItem.ClippingProperties!

setEndPositionMs

@CanIgnoreReturnValue
fun setEndPositionMs(endPositionMs: Long): MediaItem.ClippingConfiguration.Builder!

Sets the optional end position in milliseconds which must be a value larger than or equal to zero, or TIME_END_OF_SOURCE to end when playback reaches the end of media (Default: TIME_END_OF_SOURCE).

setEndPositionUs

@UnstableApi
@CanIgnoreReturnValue
fun setEndPositionUs(endPositionUs: Long): MediaItem.ClippingConfiguration.Builder!

Sets the optional end position in milliseconds which must be a value larger than or equal to zero, or TIME_END_OF_SOURCE to end when playback reaches the end of media (Default: TIME_END_OF_SOURCE).

setRelativeToDefaultPosition

@CanIgnoreReturnValue
fun setRelativeToDefaultPosition(relativeToDefaultPosition: Boolean): MediaItem.ClippingConfiguration.Builder!

Sets whether the start position and the end position are relative to the default position in the window (Default: false).

setRelativeToLiveWindow

@CanIgnoreReturnValue
fun setRelativeToLiveWindow(relativeToLiveWindow: Boolean): MediaItem.ClippingConfiguration.Builder!

Sets whether the start/end positions should move with the live window for live streams. If false, live streams end when playback reaches the end position in live window seen when the media is first loaded (Default: false).

setStartPositionMs

@CanIgnoreReturnValue
fun setStartPositionMs(startPositionMs: @IntRange(from = 0) Long): MediaItem.ClippingConfiguration.Builder!

Sets the optional start position in milliseconds which must be a value larger than or equal to zero (Default: 0).

setStartPositionUs

@UnstableApi
@CanIgnoreReturnValue
fun setStartPositionUs(startPositionUs: @IntRange(from = 0) Long): MediaItem.ClippingConfiguration.Builder!

Sets the optional start position in microseconds which must be a value larger than or equal to zero (Default: 0).

setStartsAtKeyFrame

@CanIgnoreReturnValue
fun setStartsAtKeyFrame(startsAtKeyFrame: Boolean): MediaItem.ClippingConfiguration.Builder!

Sets whether the start point is guaranteed to be a key frame. If false, the playback transition into the clip may not be seamless (Default: false).