From e1f32664c1c467e0f3de3f57943497ab3bd1a072 Mon Sep 17 00:00:00 2001 From: limaAniceto Date: Thu, 11 Jun 2020 14:17:33 +0100 Subject: [PATCH] Upgrade exoplayer to 2.11.4 (#2034) --- android-exoplayer/build.gradle | 4 ++-- .../src/main/java/com/brentvatne/exoplayer/ExoPlayerView.java | 3 ++- .../java/com/brentvatne/exoplayer/ReactExoplayerView.java | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/android-exoplayer/build.gradle b/android-exoplayer/build.gradle index 502fa59947..449186101c 100644 --- a/android-exoplayer/build.gradle +++ b/android-exoplayer/build.gradle @@ -23,7 +23,7 @@ android { dependencies { implementation "com.facebook.react:react-native:${safeExtGet('reactNativeVersion', '+')}" - implementation('com.google.android.exoplayer:exoplayer:2.10.5') { + implementation('com.google.android.exoplayer:exoplayer:2.11.4') { exclude group: 'com.android.support' } @@ -32,7 +32,7 @@ dependencies { implementation "androidx.core:core:1.1.0" implementation "androidx.media:media:1.1.0" - implementation('com.google.android.exoplayer:extension-okhttp:2.10.5') { + implementation('com.google.android.exoplayer:extension-okhttp:2.11.4') { exclude group: 'com.squareup.okhttp3', module: 'okhttp' } implementation 'com.squareup.okhttp3:okhttp:3.14.3' 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 9f3d09bed0..2b43b45e0e 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerView.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerView.java @@ -21,6 +21,7 @@ import com.google.android.exoplayer2.source.TrackGroupArray; import com.google.android.exoplayer2.text.Cue; import com.google.android.exoplayer2.text.TextRenderer; +import com.google.android.exoplayer2.text.TextOutput; import com.google.android.exoplayer2.trackselection.TrackSelectionArray; import com.google.android.exoplayer2.ui.SubtitleView; @@ -200,7 +201,7 @@ private void updateForCurrentTrackSelections() { } private final class ComponentListener implements SimpleExoPlayer.VideoListener, - TextRenderer.Output, ExoPlayer.EventListener { + TextOutput, ExoPlayer.EventListener { // TextRenderer.Output implementation 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 2f516793f2..8610288943 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -830,7 +830,7 @@ public void onPlayerError(ExoPlaybackException e) { // Special case for decoder initialization failures. MediaCodecRenderer.DecoderInitializationException decoderInitializationException = (MediaCodecRenderer.DecoderInitializationException) cause; - if (decoderInitializationException.decoderName == null) { + if (decoderInitializationException.codecInfo.name == null) { if (decoderInitializationException.getCause() instanceof MediaCodecUtil.DecoderQueryException) { errorString = getResources().getString(R.string.error_querying_decoders); } else if (decoderInitializationException.secureDecoderRequired) { @@ -842,7 +842,7 @@ public void onPlayerError(ExoPlaybackException e) { } } else { errorString = getResources().getString(R.string.error_instantiating_decoder, - decoderInitializationException.decoderName); + decoderInitializationException.codecInfo.name); } } }