From 2477288ea2d6d3281792a73ffff0dd41837d741e Mon Sep 17 00:00:00 2001 From: Peace Date: Tue, 3 Apr 2018 12:19:04 -0500 Subject: [PATCH 1/2] Upgrade ExoPlayer to 2.7.2 --- android-exoplayer/build.gradle | 4 ++-- .../brentvatne/exoplayer/ExoPlayerView.java | 20 +++++++++++++++++-- .../exoplayer/ReactExoplayerView.java | 20 +++++++++++++++++-- 3 files changed, 38 insertions(+), 6 deletions(-) diff --git a/android-exoplayer/build.gradle b/android-exoplayer/build.gradle index b25b8164..6d995692 100644 --- a/android-exoplayer/build.gradle +++ b/android-exoplayer/build.gradle @@ -12,8 +12,8 @@ android { dependencies { provided 'com.facebook.react:react-native:+' - compile 'com.google.android.exoplayer:exoplayer:r2.4.0' - compile('com.google.android.exoplayer:extension-okhttp:r2.4.0') { + compile 'com.google.android.exoplayer:exoplayer:2.7.2' + compile('com.google.android.exoplayer:extension-okhttp:2.7.2') { exclude group: 'com.squareup.okhttp3', module: 'okhttp' } compile 'com.squareup.okhttp3:okhttp:3.4.2' diff --git a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerView.java b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerView.java index 224a2d81..e4a7a57b 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerView.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerView.java @@ -27,6 +27,7 @@ import com.google.android.exoplayer2.trackselection.TrackSelectionArray; import com.google.android.exoplayer2.ui.SubtitleView; import java.util.List; +import java.lang.Object; @TargetApi(16) public final class ExoPlayerView extends FrameLayout { @@ -212,12 +213,12 @@ public final class ExoPlayerView extends FrameLayout { } @Override - public void onPositionDiscontinuity() { + public void onPositionDiscontinuity(int reason) { // Do nothing. } @Override - public void onTimelineChanged(Timeline timeline, Object manifest) { + public void onTimelineChanged(Timeline timeline, Object manifest, int reason) { // Do nothing. } @@ -235,6 +236,21 @@ public final class ExoPlayerView extends FrameLayout { public void onMetadata(Metadata metadata) { Log.d("onMetadata", "onMetadata"); } + + @Override + public void onSeekProcessed() { + // Do nothing. + } + + @Override + public void onShuffleModeEnabledChanged(boolean shuffleModeEnabled) { + // Do nothing. + } + + @Override + public void onRepeatModeChanged(int repeatMode) { + // Do nothing. + } } } diff --git a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index f24d94c2..bc871bb3 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -52,6 +52,7 @@ import java.net.CookieHandler; import java.net.CookieManager; import java.net.CookiePolicy; import java.lang.Math; +import java.lang.Object; @SuppressLint("ViewConstructor") class ReactExoplayerView extends FrameLayout implements @@ -455,7 +456,7 @@ class ReactExoplayerView extends FrameLayout implements } @Override - public void onPositionDiscontinuity() { + public void onPositionDiscontinuity(int reason) { if (playerNeedsSource) { // This will only occur if the user has performed a seek whilst in the error state. Update the // resume position so that if the user then retries, playback will resume from the position to @@ -465,7 +466,22 @@ class ReactExoplayerView extends FrameLayout implements } @Override - public void onTimelineChanged(Timeline timeline, Object manifest) { + public void onTimelineChanged(Timeline timeline, Object manifest, int reason) { + // Do nothing. + } + + @Override + public void onSeekProcessed() { + // Do nothing. + } + + @Override + public void onShuffleModeEnabledChanged(boolean shuffleModeEnabled) { + // Do nothing. + } + + @Override + public void onRepeatModeChanged(int repeatMode) { // Do nothing. } From 785cac6f46b90caf7f6b0650528b163ddd8c9326 Mon Sep 17 00:00:00 2001 From: Peace Date: Mon, 21 May 2018 09:28:45 -0500 Subject: [PATCH 2/2] Upgrade Exoplayer to 2.7.3; OkHttp to 3.9.1. --- android-exoplayer/build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/android-exoplayer/build.gradle b/android-exoplayer/build.gradle index 6d995692..9aeaa593 100644 --- a/android-exoplayer/build.gradle +++ b/android-exoplayer/build.gradle @@ -12,9 +12,9 @@ android { dependencies { provided 'com.facebook.react:react-native:+' - compile 'com.google.android.exoplayer:exoplayer:2.7.2' - compile('com.google.android.exoplayer:extension-okhttp:2.7.2') { + compile 'com.google.android.exoplayer:exoplayer:2.7.3' + compile('com.google.android.exoplayer:extension-okhttp:2.7.3') { exclude group: 'com.squareup.okhttp3', module: 'okhttp' } - compile 'com.squareup.okhttp3:okhttp:3.4.2' + compile 'com.squareup.okhttp3:okhttp:3.9.1' }