From 3b0d4592303e41cf4ba0ed69c450970755e91f90 Mon Sep 17 00:00:00 2001 From: Ash Mishra Date: Thu, 16 Aug 2018 15:32:36 -0700 Subject: [PATCH] Fix for files that are stored in the Documents folder on iOS (and not as resources in the JS app) --- ios/Video/RCTVideo.m | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ios/Video/RCTVideo.m b/ios/Video/RCTVideo.m index a4f11492..8732f768 100644 --- a/ios/Video/RCTVideo.m +++ b/ios/Video/RCTVideo.m @@ -370,7 +370,7 @@ static int const RCTVideoUnset = -1; } - (NSURL*) urlFilePath:(NSString*) filepath { - if ([filepath containsString:@"file://"]) { + if ([filepath containsString:@"file://"] && ![filepath containsString:@"/Documents/"]) { return [NSURL URLWithString:filepath]; } @@ -1101,11 +1101,11 @@ static int const RCTVideoUnset = -1; if (!_fullscreenOptions) { [self setFullscreenOptions: - @{ - @"enabled": enabled, - @"autorotate": @"0", - @"preferredOrientation": @"default" - }]; + @{ + @"enabled": enabled, + @"autorotate": @"0", + @"preferredOrientation": @"default" + }]; } else { [_fullscreenOptions setValue:enabled forKey:@"enabled"];