Merge branch 'master' of git://github.com/react-native-community/react-native-video into react-native-community-master

Merge branch 'master' of git://github.com/react-native-community/react-native-video into react-native-community-master
This commit is contained in:
sridhar
2018-10-27 09:19:28 +05:30
157 changed files with 5271 additions and 577 deletions

View File

@@ -17,20 +17,19 @@ android {
}
dependencies {
//noinspection GradleDynamicVersion
provided "com.facebook.react:react-native:${safeExtGet('reactNativeVersion', '+')}"
compile('com.google.android.exoplayer:exoplayer:2.8.2') {
compileOnly "com.facebook.react:react-native:${safeExtGet('reactNativeVersion', '+')}"
implementation('com.google.android.exoplayer:exoplayer:2.9.0') {
exclude group: 'com.android.support'
}
// All support libs must use the same version
compile "com.android.support:support-annotations:${safeExtGet('supportLibVersion', '+')}"
compile "com.android.support:support-compat:${safeExtGet('supportLibVersion', '+')}"
compile "com.android.support:support-media-compat:${safeExtGet('supportLibVersion', '+')}"
implementation "com.android.support:support-annotations:${safeExtGet('supportLibVersion', '+')}"
implementation "com.android.support:support-compat:${safeExtGet('supportLibVersion', '+')}"
implementation "com.android.support:support-media-compat:${safeExtGet('supportLibVersion', '+')}"
compile('com.google.android.exoplayer:extension-okhttp:2.8.2') {
implementation('com.google.android.exoplayer:extension-okhttp:2.9.0') {
exclude group: 'com.squareup.okhttp3', module: 'okhttp'
}
compile 'com.squareup.okhttp3:okhttp:3.11.0'
implementation 'com.squareup.okhttp3:okhttp:3.11.0'
}

View File

@@ -225,7 +225,10 @@ class ReactExoplayerView extends FrameLayout implements
@Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
stopPlayback();
/* We want to be able to continue playing audio when switching tabs.
* Leave this here in case it causes issues.
*/
// stopPlayback();
}
// LifecycleEventListener implementation

View File

@@ -244,7 +244,7 @@ public class ReactExoplayerViewManager extends ViewGroupManager<ReactExoplayerVi
videoView.setFullscreen(fullscreen);
}
@ReactProp(name = PROP_USE_TEXTURE_VIEW, defaultBoolean = false)
@ReactProp(name = PROP_USE_TEXTURE_VIEW, defaultBoolean = true)
public void setUseTextureView(final ReactExoplayerView videoView, final boolean useTextureView) {
videoView.setUseTextureView(useTextureView);
}