Upgrade ExoPlayer to 2.7.2

This commit is contained in:
Peace 2018-04-03 12:19:04 -05:00
parent 737d348ff0
commit 2477288ea2
3 changed files with 38 additions and 6 deletions

View File

@ -12,8 +12,8 @@ android {
dependencies { dependencies {
provided 'com.facebook.react:react-native:+' provided 'com.facebook.react:react-native:+'
compile 'com.google.android.exoplayer:exoplayer:r2.4.0' compile 'com.google.android.exoplayer:exoplayer:2.7.2'
compile('com.google.android.exoplayer:extension-okhttp:r2.4.0') { compile('com.google.android.exoplayer:extension-okhttp:2.7.2') {
exclude group: 'com.squareup.okhttp3', module: 'okhttp' exclude group: 'com.squareup.okhttp3', module: 'okhttp'
} }
compile 'com.squareup.okhttp3:okhttp:3.4.2' compile 'com.squareup.okhttp3:okhttp:3.4.2'

View File

@ -27,6 +27,7 @@ import com.google.android.exoplayer2.trackselection.TrackSelectionArray;
import com.google.android.exoplayer2.ui.SubtitleView; import com.google.android.exoplayer2.ui.SubtitleView;
import java.util.List; import java.util.List;
import java.lang.Object;
@TargetApi(16) @TargetApi(16)
public final class ExoPlayerView extends FrameLayout { public final class ExoPlayerView extends FrameLayout {
@ -212,12 +213,12 @@ public final class ExoPlayerView extends FrameLayout {
} }
@Override @Override
public void onPositionDiscontinuity() { public void onPositionDiscontinuity(int reason) {
// Do nothing. // Do nothing.
} }
@Override @Override
public void onTimelineChanged(Timeline timeline, Object manifest) { public void onTimelineChanged(Timeline timeline, Object manifest, int reason) {
// Do nothing. // Do nothing.
} }
@ -235,6 +236,21 @@ public final class ExoPlayerView extends FrameLayout {
public void onMetadata(Metadata metadata) { public void onMetadata(Metadata metadata) {
Log.d("onMetadata", "onMetadata"); 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.
}
} }
} }

View File

@ -52,6 +52,7 @@ import java.net.CookieHandler;
import java.net.CookieManager; import java.net.CookieManager;
import java.net.CookiePolicy; import java.net.CookiePolicy;
import java.lang.Math; import java.lang.Math;
import java.lang.Object;
@SuppressLint("ViewConstructor") @SuppressLint("ViewConstructor")
class ReactExoplayerView extends FrameLayout implements class ReactExoplayerView extends FrameLayout implements
@ -455,7 +456,7 @@ class ReactExoplayerView extends FrameLayout implements
} }
@Override @Override
public void onPositionDiscontinuity() { public void onPositionDiscontinuity(int reason) {
if (playerNeedsSource) { if (playerNeedsSource) {
// This will only occur if the user has performed a seek whilst in the error state. Update the // 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 // 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 @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. // Do nothing.
} }