Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
thoblr committed Jun 2, 2016
2 parents f98ce00 + b58c7e0 commit a10fe75
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ Under `.addPackage(new MainReactPackage())`:
paused={false} // Pauses playback entirely.
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.
onLoadStart={this.loadStart} // Callback when video starts to load
onLoad={this.setDuration} // Callback when video loads
onProgress={this.setTime} // Callback every ~250ms with currentTime
Expand All @@ -90,6 +92,10 @@ var styles = StyleSheet.create({
});
```

### Play in background on iOS

To enable audio to play in background on iOS the audio session needs to be set to `AVAudioSessionCategoryPlayback`. See [Apple documentation][3].

## Static Methods

`seek(seconds)`
Expand Down Expand Up @@ -120,6 +126,7 @@ Seeks the video to the specified time (in seconds). Access using a ref to the co

[1]: https://github.com/brentvatne/react-native-login/blob/56c47a5d1e23781e86e19b27e10427fd6391f666/App/Screens/UserInfoScreen.js#L32-L35
[2]: https://github.com/brentvatne/react-native-video/tree/master/Examples/VideoPlayer
[3]: https://developer.apple.com/library/ios/qa/qa1668/_index.html

---

Expand Down

0 comments on commit a10fe75

Please sign in to comment.