From c2272bc8d65906de4e7366c15fc3bf59f4783874 Mon Sep 17 00:00:00 2001 From: skleest Date: Thu, 28 Apr 2016 21:40:46 -0700 Subject: [PATCH] README: prevent blocking outside music --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index d1d4df1f..60e435d3 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,20 @@ Run `npm install react-native-video --save` Install [rnpm](https://github.com/rnpm/rnpm) and run `rnpm link react-native-video` +If you would like to allow other apps to play music over your video component, add: + +**AppDelegate.m** +``` +#import // import + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + ... + [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryAmbient error:nil]; // allow + ... +} +``` + #### Android First, copy your video file to `android/app/src/main/res/raw/`, then