Misc tweaks to UI components
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=161454491
This commit is contained in:
parent
f94db63366
commit
4233f81ed7
@ -712,7 +712,12 @@ public class PlaybackControlView extends FrameLayout {
|
|||||||
if (fastForwardMs <= 0) {
|
if (fastForwardMs <= 0) {
|
||||||
return;
|
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) {
|
private void seekTo(long positionMs) {
|
||||||
|
@ -574,7 +574,8 @@ public final class SimpleExoPlayerView extends FrameLayout {
|
|||||||
/**
|
/**
|
||||||
* Sets the rewind increment in milliseconds.
|
* 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) {
|
public void setRewindIncrementMs(int rewindMs) {
|
||||||
Assertions.checkState(controller != null);
|
Assertions.checkState(controller != null);
|
||||||
@ -584,7 +585,8 @@ public final class SimpleExoPlayerView extends FrameLayout {
|
|||||||
/**
|
/**
|
||||||
* Sets the fast forward increment in milliseconds.
|
* 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) {
|
public void setFastForwardIncrementMs(int fastForwardMs) {
|
||||||
Assertions.checkState(controller != null);
|
Assertions.checkState(controller != null);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user