Skip to content

Commit

Permalink
Update readme (TheWidlarzGroup#497)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewJack authored and Matt Apperson committed Mar 21, 2017
1 parent c56fd2d commit 5a4730c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 23 deletions.
34 changes: 12 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,48 +36,38 @@ Or if you have trouble, make the following additions to the given files manually

**android/settings.gradle**

```
```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
dependencies {
...
compile project(':react-native-video')
}
```

**MainActivity.java**

On top, where imports are:

```java
import com.brentvatne.react.ReactVideoPackage;
```

Under `.addPackage(new MainReactPackage())`:

```java
.addPackage(new ReactVideoPackage())
```

### Note: In react-native >= 0.29.0 you have to edit `MainApplication.java`

**MainApplication.java** (react-native >= 0.29.0)
**MainApplication.java**

On top, where imports are:

```java
import com.brentvatne.react.ReactVideoPackage;
```

Under `.addPackage(new MainReactPackage())`:
Add the `ReactVideoPackage` class to your list of exported packages.

```java
.addPackage(new ReactVideoPackage())
@Override
protected List<ReactPackage> getPackages() {
return Arrays.asList(
new MainReactPackage(),
new ReactVideoPackage()
);
}
```

#### Windows
Expand Down Expand Up @@ -140,7 +130,7 @@ using System.Collections.Generic;
volume={1.0} // 0 is muted, 1 is normal.
muted={false} // Mutes the audio entirely.
paused={false} // Pauses playback entirely.
resizeMode="cover" // Fill the whole screen at aspect ratio.*
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.
Expand Down
2 changes: 1 addition & 1 deletion android-exoplayer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ https://github.com/google/ExoPlayer
this.setState({ pause: true })
}

onAudioFocusChanged(event: { hasAudioFocus: boolean }) {
onAudioFocusChanged = (event: { hasAudioFocus: boolean }) => {
if (!this.state.paused && !event.hasAudioFocus) {
this.setState({ paused: true })
}
Expand Down

0 comments on commit 5a4730c

Please sign in to comment.