mirror of
https://github.com/androidx/media.git
synced 2025-05-15 19:49:50 +08:00
Prevent buffering when clicking ffwd button at the end of stream
PiperOrigin-RevId: 329634001
This commit is contained in:
parent
5b80eb8ecc
commit
f68fc3e701
@ -1638,7 +1638,9 @@ public class StyledPlayerControlView extends FrameLayout {
|
||||
}
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
if (keyCode == KeyEvent.KEYCODE_MEDIA_FAST_FORWARD) {
|
||||
controlDispatcher.dispatchFastForward(player);
|
||||
if (player.getPlaybackState() != Player.STATE_ENDED) {
|
||||
controlDispatcher.dispatchFastForward(player);
|
||||
}
|
||||
} else if (keyCode == KeyEvent.KEYCODE_MEDIA_REWIND) {
|
||||
controlDispatcher.dispatchRewind(player);
|
||||
} else if (event.getRepeatCount() == 0) {
|
||||
@ -1808,7 +1810,9 @@ public class StyledPlayerControlView extends FrameLayout {
|
||||
} else if (previousButton == view) {
|
||||
controlDispatcher.dispatchPrevious(player);
|
||||
} else if (fastForwardButton == view) {
|
||||
controlDispatcher.dispatchFastForward(player);
|
||||
if (player.getPlaybackState() != Player.STATE_ENDED) {
|
||||
controlDispatcher.dispatchFastForward(player);
|
||||
}
|
||||
} else if (rewindButton == view) {
|
||||
controlDispatcher.dispatchRewind(player);
|
||||
} else if (playPauseButton == view) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user