mirror of
https://github.com/yuliskov/SmartTube.git
synced 2025-05-17 11:25:54 +08:00
bump to 4.51
This commit is contained in:
Submodule MediaServiceCore updated: d390377380...8fd47bb250
@ -211,10 +211,11 @@ public class StateUpdater extends PlayerEventListenerHelper {
|
||||
state = new State(getNewPosition(item.percentWatched));
|
||||
}
|
||||
|
||||
boolean nearEnd = Math.abs(mController.getLengthMs() - mController.getPositionMs()) < 10_000;
|
||||
|
||||
if (state != null && !nearEnd) {
|
||||
mController.setPositionMs(state.positionMs);
|
||||
if (state != null) {
|
||||
boolean isVideoEnded = Math.abs(mController.getLengthMs() - state.positionMs) < 1_000;
|
||||
if (!isVideoEnded) {
|
||||
mController.setPositionMs(state.positionMs);
|
||||
}
|
||||
}
|
||||
|
||||
mController.setPlay(mIsPlaying);
|
||||
|
@ -46,8 +46,8 @@ android {
|
||||
applicationId "com.liskovsoft.smarttubetv"
|
||||
minSdkVersion project.properties.minSdkVersion
|
||||
targetSdkVersion project.properties.targetSdkVersion
|
||||
versionCode 65
|
||||
versionName "4.5"
|
||||
versionCode 71
|
||||
versionName "4.51"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
buildConfigField "long", "TIMESTAMP", System.currentTimeMillis() + "L"
|
||||
|
||||
|
@ -70,10 +70,10 @@ public class PlaybackFragment extends VideoSupportFragment implements PlaybackVi
|
||||
private SubtitleManager mSubtitleManager;
|
||||
private DebugInfoManager mDebugInfoManager;
|
||||
private UriBackgroundManager mBackgroundManager;
|
||||
private final boolean mEnableAnimation = true;
|
||||
private RowsSupportFragment mRowsSupportFragment;
|
||||
private boolean mBlockEngine;
|
||||
private boolean mEnablePIP;
|
||||
private final boolean mIsAnimationEnabled = true;
|
||||
private boolean mIsEngineBlocked;
|
||||
private boolean mIsPIPEnabled;
|
||||
private ExoPlayerInitializer mPlayerInitializer;
|
||||
|
||||
@Override
|
||||
@ -236,7 +236,7 @@ public class PlaybackFragment extends VideoSupportFragment implements PlaybackVi
|
||||
mPlayerGlue.setHost(new VideoSupportFragmentGlueHost(this));
|
||||
mPlayerGlue.setSeekEnabled(true);
|
||||
mPlayerGlue.setControlsOverlayAutoHideEnabled(false); // don't show controls on some player events like play/pause/end
|
||||
hideControlsOverlay(mEnableAnimation); // hide controls upon fragment creation
|
||||
hideControlsOverlay(mIsAnimationEnabled); // hide controls upon fragment creation
|
||||
|
||||
mSubtitleManager = new SubtitleManager(getActivity(), R.id.leanback_subtitles);
|
||||
|
||||
@ -472,22 +472,22 @@ public class PlaybackFragment extends VideoSupportFragment implements PlaybackVi
|
||||
|
||||
@Override
|
||||
public void blockEngine(boolean block) {
|
||||
mBlockEngine = block;
|
||||
mIsEngineBlocked = block;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEngineBlocked() {
|
||||
return mBlockEngine;
|
||||
return mIsEngineBlocked;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enablePIP(boolean enable) {
|
||||
mEnablePIP = enable;
|
||||
mIsPIPEnabled = enable;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPIPEnabled() {
|
||||
return mEnablePIP;
|
||||
return mIsPIPEnabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -577,9 +577,9 @@ public class PlaybackFragment extends VideoSupportFragment implements PlaybackVi
|
||||
@Override
|
||||
public void showControls(boolean show) {
|
||||
if (show) {
|
||||
showControlsOverlay(mEnableAnimation);
|
||||
showControlsOverlay(mIsAnimationEnabled);
|
||||
} else {
|
||||
hideControlsOverlay(mEnableAnimation);
|
||||
hideControlsOverlay(mIsAnimationEnabled);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user