mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Misc tweaks to UI components
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=161454491
This commit is contained in:
parent
45f94eab62
commit
b31fd5bc7c
@ -888,7 +888,12 @@ public class PlaybackControlView extends FrameLayout {
|
||||
if (fastForwardMs <= 0) {
|
||||
return;
|
||||
}
|
||||
seekTo(Math.min(player.getCurrentPosition() + fastForwardMs, player.getDuration()));
|
||||
long durationMs = player.getDuration();
|
||||
long seekPositionMs = player.getCurrentPosition() + fastForwardMs;
|
||||
if (durationMs != C.TIME_UNSET) {
|
||||
seekPositionMs = Math.min(seekPositionMs, durationMs);
|
||||
}
|
||||
seekTo(seekPositionMs);
|
||||
}
|
||||
|
||||
private void seekTo(long positionMs) {
|
||||
|
@ -615,7 +615,8 @@ public final class SimpleExoPlayerView extends FrameLayout {
|
||||
/**
|
||||
* Sets the rewind increment in milliseconds.
|
||||
*
|
||||
* @param rewindMs The rewind increment in milliseconds.
|
||||
* @param rewindMs The rewind increment in milliseconds. A non-positive value will cause the
|
||||
* rewind button to be disabled.
|
||||
*/
|
||||
public void setRewindIncrementMs(int rewindMs) {
|
||||
Assertions.checkState(controller != null);
|
||||
@ -625,7 +626,8 @@ public final class SimpleExoPlayerView extends FrameLayout {
|
||||
/**
|
||||
* Sets the fast forward increment in milliseconds.
|
||||
*
|
||||
* @param fastForwardMs The fast forward increment in milliseconds.
|
||||
* @param fastForwardMs The fast forward increment in milliseconds. A non-positive value will
|
||||
* cause the fast forward button to be disabled.
|
||||
*/
|
||||
public void setFastForwardIncrementMs(int fastForwardMs) {
|
||||
Assertions.checkState(controller != null);
|
||||
|
Loading…
x
Reference in New Issue
Block a user