欢迎参加我们将于 6 月 3 日举行的 #Android11:Beta 版发布会

PlaybackControlsRow.OnPlaybackProgressCallback

public static class PlaybackControlsRow.OnPlaybackProgressCallback
extends Object

java.lang.Object
   ↳ androidx.leanback.widget.PlaybackControlsRow.OnPlaybackProgressCallback


Listener for progress or duration change.

Summary

Public constructors

OnPlaybackProgressCallback()

Public methods

void onBufferedPositionChanged(PlaybackControlsRow row, long bufferedProgressMs)

Called when PlaybackControlsRow.getBufferedPosition() changed.

void onCurrentPositionChanged(PlaybackControlsRow row, long currentTimeMs)

Called when PlaybackControlsRow.getCurrentPosition() changed.

void onDurationChanged(PlaybackControlsRow row, long totalTime)

Called when PlaybackControlsRow.getDuration() changed.

Inherited methods

Public constructors

OnPlaybackProgressCallback

public OnPlaybackProgressCallback ()

Public methods

onBufferedPositionChanged

public void onBufferedPositionChanged (PlaybackControlsRow row, 
                long bufferedProgressMs)

Called when PlaybackControlsRow.getBufferedPosition() changed.

Parameters
row PlaybackControlsRow: The PlaybackControlsRow that buffered progress changed.

bufferedProgressMs long: Buffered time in milliseconds.

onCurrentPositionChanged

public void onCurrentPositionChanged (PlaybackControlsRow row, 
                long currentTimeMs)

Called when PlaybackControlsRow.getCurrentPosition() changed.

Parameters
row PlaybackControlsRow: The PlaybackControlsRow that current time changed.

currentTimeMs long: Current time in milliseconds.

onDurationChanged

public void onDurationChanged (PlaybackControlsRow row, 
                long totalTime)

Called when PlaybackControlsRow.getDuration() changed.

Parameters
row PlaybackControlsRow: The PlaybackControlsRow that total time changed.

totalTime long: Total time in milliseconds.