pull/21/head
21561 3 years ago
parent c856e5d900
commit 8071a2f976
  1. 8
      app/src/main/java/com/github/tvbox/osc/player/controller/VodController.java
  2. 2
      app/src/main/java/com/github/tvbox/osc/ui/activity/DetailActivity.java

@ -103,7 +103,7 @@ public class VodController extends BaseController {
Handler myHandle;
Runnable myRunnable;
int myHandleSeconds = 5000;//闲置多少毫秒秒关闭底栏 默认5
int myHandleSeconds = 6000;//闲置多少毫秒秒关闭底栏 默认6
@Override
protected void initView() {
@ -179,6 +179,8 @@ public class VodController extends BaseController {
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
myHandle.removeCallbacks(myRunnable);
myHandle.postDelayed(myRunnable, myHandleSeconds);
long duration = mControlWrapper.getDuration();
long newPosition = (duration * seekBar.getProgress()) / seekBar.getMax();
mControlWrapper.seekTo((int) newPosition);
@ -449,6 +451,7 @@ public class VodController extends BaseController {
@Override
protected void setProgress(int duration, int position) {
if (mIsDragging) {
return;
}
@ -570,10 +573,12 @@ public class VodController extends BaseController {
@Override
public boolean onKeyEvent(KeyEvent event) {
myHandle.removeCallbacks(myRunnable);
if (super.onKeyEvent(event)) {
return true;
}
if (isBottomVisible()) {
myHandle.postDelayed(myRunnable, myHandleSeconds);
return super.dispatchKeyEvent(event);
}
boolean isInPlayback = isInPlaybackState();
@ -592,7 +597,6 @@ public class VodController extends BaseController {
}
// } else if (keyCode == KeyEvent.KEYCODE_DPAD_UP) { // 闲置开启计时关闭透明底栏
} else if (keyCode == KeyEvent.KEYCODE_DPAD_DOWN || keyCode == KeyEvent.KEYCODE_DPAD_UP) {
myHandle.removeCallbacks(myRunnable);
if (!isBottomVisible()) {
showBottom();
myHandle.postDelayed(myRunnable, myHandleSeconds);

@ -260,7 +260,7 @@ public class DetailActivity extends BaseActivity {
@Override
public void onItemPreSelected(TvRecyclerView parent, View itemView, int position) {
seriesSelect = false;
}
@Override

Loading…
Cancel
Save