From 9c51d00f3465f95006b1573a6c576024c9b1e077 Mon Sep 17 00:00:00 2001 From: Hampton Maxwell Date: Fri, 8 Jun 2018 20:43:43 -0700 Subject: [PATCH] Document props for playInBackground & playWhenInactive --- README.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d09c82a0..30ae86e9 100644 --- a/README.md +++ b/README.md @@ -184,8 +184,6 @@ using System.Collections.Generic; ref={(ref) => { this.player = ref }} // Store reference - 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 onBuffer={this.onBuffer} // Callback when remote video is buffering onEnd={this.onEnd} // Callback when playback finishes onError={this.videoError} // Callback when video cannot be loaded @@ -224,6 +222,8 @@ var styles = StyleSheet.create({ * [ignoreSilentSwitch](#ignoresilentswitch) * [muted](#muted) * [paused](#paused) +* [playInBackground](#playinbackground) +* [playWhenInactive](#playwheninactive) * [poster](#poster) * [posterResizeMode](#posterresizemode) * [progressUpdateInterval](#progressupdateinterval) @@ -281,6 +281,22 @@ Default: 250.0. Platforms: all +#### playInBackground +Determine whether the media should continue playing while the app is in the background. This allows customers to continue listening to the audio. +* **false (default)** - Don't continue playing the media +* **true** - Continue playing the media + +iOS support is currently broken until background service support is added [#797](https://github.com/react-native-community/react-native-video/issues/797) + +Platforms: Android ExoPlayer, Android MediaPlayer + +#### playWhenInactive +Determine whether the media should continue playing when notifications or the Control Center are in front of the video. +* **false (default)** - Don't continue playing the media +* **true** - Continue playing the media + +Platforms: iOS + #### rate Speed at which the media should play. * **0.0** - Pauses the video