This commit is contained in:
Hampton Maxwell 2018-05-28 23:25:52 -07:00
commit e32bf759cc

View File

@ -79,11 +79,21 @@ Or if you have trouble, make the following additions to the given files manually
**android/settings.gradle** **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 ```gradle
include ':react-native-video' include ':react-native-video'
project(':react-native-video').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video/android') project(':react-native-video').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video/android')
``` ```
**android/app/build.gradle** **android/app/build.gradle**
```gradle ```gradle
@ -116,6 +126,7 @@ protected List<ReactPackage> getPackages() {
<details> <details>
<summary>Windows</summary> <summary>Windows</summary>
Make the following additions to the given files manually: Make the following additions to the given files manually:
**windows/myapp.sln** **windows/myapp.sln**
@ -176,12 +187,12 @@ using System.Collections.Generic;
}} // Store reference }} // Store reference
rate={1.0} // 0 is paused, 1 is normal. rate={1.0} // 0 is paused, 1 is normal.
volume={1.0} // 0 is muted, 1 is normal. volume={1.0} // 0 is muted, 1 is normal.
muted={false} // Mutes the audio entirely. muted={true|false} // Mutes the audio entirely. Default false
paused={false} // Pauses playback entirely. paused={true|false} // Pauses playback entirely. Default false
resizeMode="cover" // Fill the whole screen at aspect ratio.* resizeMode="cover" // Fill the whole screen at aspect ratio.*
repeat={true} // Repeat forever. repeat={true|false} // Repeat forever. Default false
playInBackground={false} // Audio continues to play when app entering background. playInBackground={true|false} // Audio continues to play when app entering background. Default false
playWhenInactive={false} // [iOS] Video continues to play when control or notification center are shown. 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. 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) progressUpdateInterval={250.0} // [iOS] Interval to fire onProgress (default to ~250ms)
onBuffer={this.onBuffer} // Callback when remote video is buffering onBuffer={this.onBuffer} // Callback when remote video is buffering