Update readme (#497)
This commit is contained in:
		
				
					committed by
					
						
						Matt Apperson
					
				
			
			
				
	
			
			
			
						parent
						
							c56fd2d908
						
					
				
				
					commit
					5a4730cb8c
				
			
							
								
								
									
										32
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										32
									
								
								README.md
									
									
									
									
									
								
							@@ -36,21 +36,21 @@ Or if you have trouble, make the following additions to the given files manually
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
**android/settings.gradle**
 | 
					**android/settings.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
 | 
				
			||||||
dependencies {
 | 
					dependencies {
 | 
				
			||||||
   ...
 | 
					   ...
 | 
				
			||||||
   compile project(':react-native-video')
 | 
					   compile project(':react-native-video')
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
**MainActivity.java**
 | 
					**MainApplication.java**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
On top, where imports are:
 | 
					On top, where imports are:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -58,26 +58,16 @@ On top, where imports are:
 | 
				
			|||||||
import com.brentvatne.react.ReactVideoPackage;
 | 
					import com.brentvatne.react.ReactVideoPackage;
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Under `.addPackage(new MainReactPackage())`:
 | 
					Add the `ReactVideoPackage` class to your list of exported packages.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```java
 | 
					```java
 | 
				
			||||||
.addPackage(new ReactVideoPackage())
 | 
					@Override
 | 
				
			||||||
```
 | 
					protected List<ReactPackage> getPackages() {
 | 
				
			||||||
 | 
					    return Arrays.asList(
 | 
				
			||||||
### Note: In react-native >= 0.29.0 you have to edit `MainApplication.java`
 | 
					            new MainReactPackage(),
 | 
				
			||||||
 | 
					            new ReactVideoPackage()
 | 
				
			||||||
**MainApplication.java** (react-native >= 0.29.0)
 | 
					    );
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
On top, where imports are:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
```java
 | 
					 | 
				
			||||||
import com.brentvatne.react.ReactVideoPackage;
 | 
					 | 
				
			||||||
```
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Under `.addPackage(new MainReactPackage())`:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
```java
 | 
					 | 
				
			||||||
.addPackage(new ReactVideoPackage())
 | 
					 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#### Windows
 | 
					#### Windows
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -33,7 +33,7 @@ https://github.com/google/ExoPlayer
 | 
				
			|||||||
    this.setState({ pause: true })
 | 
					    this.setState({ pause: true })
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  onAudioFocusChanged(event: { hasAudioFocus: boolean }) {
 | 
					  onAudioFocusChanged = (event: { hasAudioFocus: boolean }) => {
 | 
				
			||||||
    if (!this.state.paused && !event.hasAudioFocus) {
 | 
					    if (!this.state.paused && !event.hasAudioFocus) {
 | 
				
			||||||
      this.setState({ paused: true })
 | 
					      this.setState({ paused: true })
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user