From d63c690899e7d92bb7850a7a730648c1c515c362 Mon Sep 17 00:00:00 2001 From: Hampton Maxwell Date: Mon, 28 May 2018 22:12:02 -0700 Subject: [PATCH 1/2] Add instructions for using ExoPlayer Update Android instructions for using both ExoPlayer and the old Android player --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 4d805b42..764644a4 100644 --- a/README.md +++ b/README.md @@ -79,11 +79,21 @@ Or if you have trouble, make the following additions to the given files manually **android/settings.gradle** +The newer ExoPlayer library will work for most people. + +```gradle +include ':react-native-video' +project(':react-native-video').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video/android-exoplayer') +``` + +If you need to use the old Android media player based player, use the following instead: + ```gradle include ':react-native-video' project(':react-native-video').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video/android') ``` + **android/app/build.gradle** ```gradle @@ -116,6 +126,7 @@ protected List getPackages() {
Windows + Make the following additions to the given files manually: **windows/myapp.sln** From 025770eb1354abe7b5e8a45d130751f5a5586f38 Mon Sep 17 00:00:00 2001 From: Hampton Maxwell Date: Mon, 28 May 2018 22:50:42 -0700 Subject: [PATCH 2/2] Clean up booleans Show options as either true or false and include note about default values. --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 764644a4..0a3afb03 100644 --- a/README.md +++ b/README.md @@ -187,12 +187,12 @@ using System.Collections.Generic; }} // Store reference rate={1.0} // 0 is paused, 1 is normal. volume={1.0} // 0 is muted, 1 is normal. - muted={false} // Mutes the audio entirely. - paused={false} // Pauses playback entirely. + muted={true|false} // Mutes the audio entirely. Default false + paused={true|false} // Pauses playback entirely. Default false resizeMode="cover" // Fill the whole screen at aspect ratio.* - repeat={true} // Repeat forever. - playInBackground={false} // Audio continues to play when app entering background. - playWhenInactive={false} // [iOS] Video continues to play when control or notification center are shown. + repeat={true|false} // Repeat forever. Default false + playInBackground={true|false} // Audio continues to play when app entering background. Default false + playWhenInactive={true|false} // [iOS] Video continues to play when control or notification center are shown. Default false ignoreSilentSwitch={"ignore"} // [iOS] ignore | obey - When 'ignore', audio will still play with the iOS hard silent switch set to silent. When 'obey', audio will toggle with the switch. When not specified, will inherit audio settings as usual. progressUpdateInterval={250.0} // [iOS] Interval to fire onProgress (default to ~250ms) onBuffer={this.onBuffer} // Callback when remote video is buffering