public final class

MediaItem.LiveConfiguration.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.media3.common.MediaItem.LiveConfiguration.Builder

Overview

Builder for MediaItem.LiveConfiguration instances.

Summary

Constructors
publicBuilder()

Constructs an instance.

Methods
public MediaItem.LiveConfigurationbuild()

Creates a MediaItem.LiveConfiguration with the values from this builder.

public MediaItem.LiveConfiguration.BuildersetMaxOffsetMs(long maxOffsetMs)

Sets the maximum allowed live offset, in milliseconds.

public MediaItem.LiveConfiguration.BuildersetMaxPlaybackSpeed(float maxPlaybackSpeed)

Sets the maximum playback speed.

public MediaItem.LiveConfiguration.BuildersetMinOffsetMs(long minOffsetMs)

Sets the minimum allowed live offset, in milliseconds.

public MediaItem.LiveConfiguration.BuildersetMinPlaybackSpeed(float minPlaybackSpeed)

Sets the minimum playback speed.

public MediaItem.LiveConfiguration.BuildersetTargetOffsetMs(long targetOffsetMs)

Sets the target live offset, in milliseconds.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public Builder()

Constructs an instance.

Methods

public MediaItem.LiveConfiguration.Builder setTargetOffsetMs(long targetOffsetMs)

Sets the target live offset, in milliseconds.

See Player#getCurrentLiveOffset().

Defaults to C.TIME_UNSET, indicating the media-defined default will be used.

public MediaItem.LiveConfiguration.Builder setMinOffsetMs(long minOffsetMs)

Sets the minimum allowed live offset, in milliseconds.

See Player#getCurrentLiveOffset().

Defaults to C.TIME_UNSET, indicating the media-defined default will be used.

public MediaItem.LiveConfiguration.Builder setMaxOffsetMs(long maxOffsetMs)

Sets the maximum allowed live offset, in milliseconds.

See Player#getCurrentLiveOffset().

Defaults to C.TIME_UNSET, indicating the media-defined default will be used.

public MediaItem.LiveConfiguration.Builder setMinPlaybackSpeed(float minPlaybackSpeed)

Sets the minimum playback speed.

Defaults to C.RATE_UNSET, indicating the media-defined default will be used.

public MediaItem.LiveConfiguration.Builder setMaxPlaybackSpeed(float maxPlaybackSpeed)

Sets the maximum playback speed.

Defaults to C.RATE_UNSET, indicating the media-defined default will be used.

Creates a MediaItem.LiveConfiguration with the values from this builder.