public interface TimeBar
| Modifier and Type | Interface and Description |
|---|---|
static interface |
TimeBar.OnScrubListener
Listener for scrubbing events.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(TimeBar.OnScrubListener listener)
Adds a listener for scrubbing events.
|
void |
removeListener(TimeBar.OnScrubListener listener)
Removes a listener for scrubbing events.
|
void |
setAdGroupTimesMs(long[] adGroupTimesMs,
boolean[] playedAdGroups,
int adGroupCount)
Sets the times of ad groups and whether each ad group has been played.
|
void |
setBufferedPosition(long bufferedPosition)
Sets the buffered position.
|
void |
setDuration(long duration)
Sets the duration.
|
void |
setEnabled(boolean enabled) |
void |
setKeyCountIncrement(int count)
Sets the position increment for key presses and accessibility actions, as a number of
increments that divide the duration of the media.
|
void |
setKeyTimeIncrement(long time)
Sets the position increment for key presses and accessibility actions, in milliseconds.
|
void |
setPosition(long position)
Sets the current position.
|
void addListener(TimeBar.OnScrubListener listener)
listener - The listener to add.void removeListener(TimeBar.OnScrubListener listener)
listener - The listener to remove.void setEnabled(boolean enabled)
View.isEnabled()void setKeyTimeIncrement(long time)
Clears any increment specified in a preceding call to setKeyCountIncrement(int).
time - The time increment, in milliseconds.void setKeyCountIncrement(int count)
Clears any increment specified in a preceding call to setKeyTimeIncrement(long).
count - The number of increments that divide the duration of the media.void setPosition(long position)
position - The current position to show, in milliseconds.void setBufferedPosition(long bufferedPosition)
bufferedPosition - The current buffered position to show, in milliseconds.void setDuration(long duration)
duration - The duration to show, in milliseconds.void setAdGroupTimesMs(@Nullable
long[] adGroupTimesMs,
@Nullable
boolean[] playedAdGroups,
int adGroupCount)
adGroupTimesMs - An array where the first adGroupCount elements are the times of
ad groups in milliseconds. May be null if there are no ad groups.playedAdGroups - An array where the first adGroupCount elements indicate whether
the corresponding ad groups have been played. May be null if there are no ad
groups.adGroupCount - The number of ad groups.