From 145e0a0b7b170a3aac0607012a9f4f713ab76b1d Mon Sep 17 00:00:00 2001 From: Robin Date: Sat, 6 Jun 2020 15:29:52 +0200 Subject: [PATCH 1/2] Update to ExoPlayer 2.11.5 --- app/build.gradle | 2 +- app/src/main/java/org/schabi/newpipe/player/BasePlayer.java | 2 +- .../schabi/newpipe/player/playback/CustomTrackSelector.java | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 434584bf0..e088d6020 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -84,7 +84,7 @@ ext { checkstyleVersion = '8.32' stethoVersion = '1.5.1' leakCanaryVersion = '2.2' - exoPlayerVersion = '2.11.4' + exoPlayerVersion = '2.11.5' androidxLifecycleVersion = '2.2.0' androidxRoomVersion = '2.2.5' groupieVersion = '2.8.0' diff --git a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java index f5a669788..344fdbf89 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java @@ -217,7 +217,7 @@ public abstract class BasePlayer implements final TrackSelection.Factory trackSelectionFactory = PlayerHelper .getQualitySelector(context); - this.trackSelector = new CustomTrackSelector(trackSelectionFactory); + this.trackSelector = new CustomTrackSelector(context, trackSelectionFactory); this.loadControl = new LoadController(); this.renderFactory = new DefaultRenderersFactory(context); diff --git a/app/src/main/java/org/schabi/newpipe/player/playback/CustomTrackSelector.java b/app/src/main/java/org/schabi/newpipe/player/playback/CustomTrackSelector.java index 2ba05b443..e554059d9 100644 --- a/app/src/main/java/org/schabi/newpipe/player/playback/CustomTrackSelector.java +++ b/app/src/main/java/org/schabi/newpipe/player/playback/CustomTrackSelector.java @@ -1,5 +1,6 @@ package org.schabi.newpipe.player.playback; +import android.content.Context; import android.text.TextUtils; import android.util.Pair; @@ -26,8 +27,9 @@ import com.google.android.exoplayer2.util.Assertions; public class CustomTrackSelector extends DefaultTrackSelector { private String preferredTextLanguage; - public CustomTrackSelector(final TrackSelection.Factory adaptiveTrackSelectionFactory) { - super(adaptiveTrackSelectionFactory); + public CustomTrackSelector(final Context context, + final TrackSelection.Factory adaptiveTrackSelectionFactory) { + super(context, adaptiveTrackSelectionFactory); } private static boolean formatHasLanguage(final Format format, final String language) { From 0a57a8a7f358263513cbf8db6ce5ad33d666a424 Mon Sep 17 00:00:00 2001 From: Robin Date: Thu, 25 Jun 2020 09:26:59 +0200 Subject: [PATCH 2/2] 2.11.6 --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index e088d6020..6e0801049 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -84,7 +84,7 @@ ext { checkstyleVersion = '8.32' stethoVersion = '1.5.1' leakCanaryVersion = '2.2' - exoPlayerVersion = '2.11.5' + exoPlayerVersion = '2.11.6' androidxLifecycleVersion = '2.2.0' androidxRoomVersion = '2.2.5' groupieVersion = '2.8.0'