MediaItem.LiveConfiguration


public final class MediaItem.LiveConfiguration


Live playback configuration.

Summary

Nested types

Builder for LiveConfiguration instances.

Constants

static final MediaItem.LiveConfiguration

A live playback configuration with unset values, meaning media-defined default values will be used.

Public fields

final long

The maximum allowed offset from the live edge, in milliseconds, or TIME_UNSET to use the media-defined default.

final float

Maximum factor by which playback can be sped up, or RATE_UNSET to use the media-defined default.

final long

The minimum allowed offset from the live edge, in milliseconds, or TIME_UNSET to use the media-defined default.

final float

Minimum factor by which playback can be sped up, or RATE_UNSET to use the media-defined default.

final long

Target offset from the live edge, in milliseconds, or TIME_UNSET to use the media-defined default.

Public constructors

@UnstableApi
LiveConfiguration(
    long targetOffsetMs,
    long minOffsetMs,
    long maxOffsetMs,
    float minPlaybackSpeed,
    float maxPlaybackSpeed
)

This method is deprecated.

Use Builder instead.

Public methods

MediaItem.LiveConfiguration.Builder

Returns a Builder initialized with the values of this instance.

boolean
static MediaItem.LiveConfiguration

Restores a LiveConfiguration from a Bundle.

int
Bundle

Constants

UNSET

public static final MediaItem.LiveConfiguration UNSET

A live playback configuration with unset values, meaning media-defined default values will be used.

Public fields

maxOffsetMs

public final long maxOffsetMs

The maximum allowed offset from the live edge, in milliseconds, or TIME_UNSET to use the media-defined default.

maxPlaybackSpeed

public final float maxPlaybackSpeed

Maximum factor by which playback can be sped up, or RATE_UNSET to use the media-defined default.

minOffsetMs

public final long minOffsetMs

The minimum allowed offset from the live edge, in milliseconds, or TIME_UNSET to use the media-defined default.

minPlaybackSpeed

public final float minPlaybackSpeed

Minimum factor by which playback can be sped up, or RATE_UNSET to use the media-defined default.

targetOffsetMs

public final long targetOffsetMs

Target offset from the live edge, in milliseconds, or TIME_UNSET to use the media-defined default.

Public constructors

LiveConfiguration

@UnstableApi
public LiveConfiguration(
    long targetOffsetMs,
    long minOffsetMs,
    long maxOffsetMs,
    float minPlaybackSpeed,
    float maxPlaybackSpeed
)

Public methods

buildUpon

public MediaItem.LiveConfiguration.Builder buildUpon()

Returns a Builder initialized with the values of this instance.

equals

public boolean equals(@Nullable Object obj)

fromBundle

@UnstableApi
public static MediaItem.LiveConfiguration fromBundle(Bundle bundle)

Restores a LiveConfiguration from a Bundle.

hashCode

public int hashCode()

toBundle

@UnstableApi
public Bundle toBundle()