1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2026-05-01 11:11:22 +00:00

-Changed start position seek to occur after media source window has been prepared.

-Fixed livestream not seeking to live when started from play queue.
-Fixed media source manager synchronization to only occur after timeline change has completed.
-Fixed auto queue not working when last item is replayed after the auto-queued item is removed.
-Updated ExoPlayer to 2.7.1.
This commit is contained in:
John Zhen Mo
2018-03-15 20:07:38 -07:00
parent 0258726f0a
commit 5a05cb96be
7 changed files with 92 additions and 79 deletions

View File

@@ -425,7 +425,7 @@ public abstract class VideoPlayer extends BasePlayer
// Create subtitle sources
for (final Subtitles subtitle : info.getSubtitles()) {
final String mimeType = PlayerHelper.mimeTypesOf(subtitle.getFileType());
if (mimeType == null || context == null) continue;
if (mimeType == null) continue;
final Format textFormat = Format.createTextSampleFormat(null, mimeType,
SELECTION_FLAG_AUTOSELECT, PlayerHelper.captionLanguageOf(context, subtitle));
@@ -599,7 +599,7 @@ public abstract class VideoPlayer extends BasePlayer
@Override
public void onUpdateProgress(int currentProgress, int duration, int bufferPercent) {
if (!isPrepared) return;
if (!isPrepared()) return;
if (duration != playbackSeekBar.getMax()) {
playbackEndTime.setText(getTimeString(duration));
@@ -624,8 +624,6 @@ public abstract class VideoPlayer extends BasePlayer
}
protected void onFullScreenButtonClicked() {
if (!isPlayerReady()) return;
changeState(STATE_BLOCKED);
}
@@ -735,7 +733,7 @@ public abstract class VideoPlayer extends BasePlayer
}
private void onResizeClicked() {
if (getAspectRatioFrameLayout() != null && context != null) {
if (getAspectRatioFrameLayout() != null) {
final int currentResizeMode = getAspectRatioFrameLayout().getResizeMode();
final int newResizeMode = nextResizeMode(currentResizeMode);
getAspectRatioFrameLayout().setResizeMode(newResizeMode);
@@ -772,7 +770,7 @@ public abstract class VideoPlayer extends BasePlayer
public void onStopTrackingTouch(SeekBar seekBar) {
if (DEBUG) Log.d(TAG, "onStopTrackingTouch() called with: seekBar = [" + seekBar + "]");
simpleExoPlayer.seekTo(seekBar.getProgress());
seekTo(seekBar.getProgress());
if (wasPlaying || simpleExoPlayer.getDuration() == seekBar.getProgress()) simpleExoPlayer.setPlayWhenReady(true);
playbackCurrentTime.setText(getTimeString(seekBar.getProgress()));