Package com.google.android.exoplayer2.ui
Interface TimeBar
-
- All Known Implementing Classes:
DefaultTimeBar
@Deprecated public interface TimeBar
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.Interface for time bar views that can display a playback position, buffered position, duration and ad markers, and that have a listener for scrubbing (seeking) events.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceTimeBar.OnScrubListenerDeprecated.Listener for scrubbing events.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidaddListener(TimeBar.OnScrubListener listener)Deprecated.Adds a listener for scrubbing events.longgetPreferredUpdateDelay()Deprecated.Returns the preferred delay in milliseconds of media time after which the time bar position should be updated.voidremoveListener(TimeBar.OnScrubListener listener)Deprecated.Removes a listener for scrubbing events.voidsetAdGroupTimesMs(long[] adGroupTimesMs, boolean[] playedAdGroups, int adGroupCount)Deprecated.Sets the times of ad groups and whether each ad group has been played.voidsetBufferedPosition(long bufferedPosition)Deprecated.Sets the buffered position.voidsetDuration(long duration)Deprecated.Sets the duration.voidsetEnabled(boolean enabled)Deprecated.voidsetKeyCountIncrement(int count)Deprecated.Sets the position increment for key presses and accessibility actions, as a number of increments that divide the duration of the media.voidsetKeyTimeIncrement(long time)Deprecated.Sets the position increment for key presses and accessibility actions, in milliseconds.voidsetPosition(long position)Deprecated.Sets the current position.
-
-
-
Method Detail
-
addListener
void addListener(TimeBar.OnScrubListener listener)
Deprecated.Adds a listener for scrubbing events.- Parameters:
listener- The listener to add.
-
removeListener
void removeListener(TimeBar.OnScrubListener listener)
Deprecated.Removes a listener for scrubbing events.- Parameters:
listener- The listener to remove.
-
setEnabled
void setEnabled(boolean enabled)
Deprecated.- See Also:
View.isEnabled()
-
setKeyTimeIncrement
void setKeyTimeIncrement(long time)
Deprecated.Sets the position increment for key presses and accessibility actions, in milliseconds.Clears any increment specified in a preceding call to
setKeyCountIncrement(int).- Parameters:
time- The time increment, in milliseconds.
-
setKeyCountIncrement
void setKeyCountIncrement(int count)
Deprecated.Sets the position increment for key presses and accessibility actions, as a number of increments that divide the duration of the media. For example, passing 20 will cause key presses to increment/decrement the position by 1/20th of the duration (if known).Clears any increment specified in a preceding call to
setKeyTimeIncrement(long).- Parameters:
count- The number of increments that divide the duration of the media.
-
setPosition
void setPosition(long position)
Deprecated.Sets the current position.- Parameters:
position- The current position to show, in milliseconds.
-
setBufferedPosition
void setBufferedPosition(long bufferedPosition)
Deprecated.Sets the buffered position.- Parameters:
bufferedPosition- The current buffered position to show, in milliseconds.
-
setDuration
void setDuration(long duration)
Deprecated.Sets the duration.- Parameters:
duration- The duration to show, in milliseconds.
-
getPreferredUpdateDelay
long getPreferredUpdateDelay()
Deprecated.Returns the preferred delay in milliseconds of media time after which the time bar position should be updated.- Returns:
- Preferred delay, in milliseconds of media time.
-
setAdGroupTimesMs
void setAdGroupTimesMs(@Nullable long[] adGroupTimesMs, @Nullable boolean[] playedAdGroups, int adGroupCount)Deprecated.Sets the times of ad groups and whether each ad group has been played.- Parameters:
adGroupTimesMs- An array where the firstadGroupCountelements are the times of ad groups in milliseconds. May benullif there are no ad groups.playedAdGroups- An array where the firstadGroupCountelements indicate whether the corresponding ad groups have been played. May benullif there are no ad groups.adGroupCount- The number of ad groups.
-
-