Back to Exoplayer

LivePlaybackSpeedControl (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/LivePlaybackSpeedControl.html

latest4.0 KB
Original Source

Package com.google.android.exoplayer2

Interface LivePlaybackSpeedControl

  • All Known Implementing Classes:DefaultLivePlaybackSpeedControl

[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public interfaceLivePlaybackSpeedControl

Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.

Controls the playback speed while playing live content in order to maintain a steady target live offset.

Method Summary

All Methods Instance Methods Abstract Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | float | getAdjustedPlaybackSpeed​(long liveOffsetUs, long bufferedDurationUs) | Deprecated.

Returns the adjusted playback speed in order get closer towards the target live offset. | | long | getTargetLiveOffsetUs() | Deprecated.

Returns the current target live offset, in microseconds, or C.TIME_UNSET if no target live offset is defined for the current media. | | void | notifyRebuffer() | Deprecated.

Notifies the live playback speed control that a rebuffer occurred. | | void | setLiveConfiguration​(MediaItem.LiveConfiguration liveConfiguration) | Deprecated.

Sets the live configuration defined by the media. | | void | setTargetLiveOffsetOverrideUs​(long liveOffsetUs) | Deprecated.

Sets the target live offset in microseconds that overrides the live offset configured by the media. |

Method Detail

- 

setLiveConfiguration

void setLiveConfiguration​([MediaItem.LiveConfiguration](MediaItem.LiveConfiguration.html "class in com.google.android.exoplayer2")liveConfiguration)

Deprecated.

Sets the live configuration defined by the media. Parameters:liveConfiguration - The MediaItem.LiveConfiguration as defined by the media.

- 

setTargetLiveOffsetOverrideUs

void setTargetLiveOffsetOverrideUs​(long liveOffsetUs)

Deprecated.

Sets the target live offset in microseconds that overrides the live offset configured by the media. Passing C.TIME_UNSET deletes a previous override.

If no target live offset is configured by setLiveConfiguration(com.google.android.exoplayer2.MediaItem.LiveConfiguration), this override has no effect.

- 

notifyRebuffer

void notifyRebuffer()

Deprecated.

Notifies the live playback speed control that a rebuffer occurred.

A rebuffer is defined to be caused by buffer depletion rather than a user action. Hence this method is not called during initial buffering or when buffering as a result of a seek operation.

- 

getAdjustedPlaybackSpeed

float getAdjustedPlaybackSpeed​(long liveOffsetUs,
                               long bufferedDurationUs)

Deprecated.

Returns the adjusted playback speed in order get closer towards the target live offset. Parameters:liveOffsetUs - The current live offset, in microseconds.bufferedDurationUs - The duration of media that's currently buffered, in microseconds.Returns:The adjusted factor by which playback should be sped up.

- 

getTargetLiveOffsetUs

long getTargetLiveOffsetUs()

Deprecated.

Returns the current target live offset, in microseconds, or C.TIME_UNSET if no target live offset is defined for the current media.