From 0cfc73252c7fb2254d407bc628f1f1afb7f11e4f Mon Sep 17 00:00:00 2001 From: Jovan Stanimirovic Date: Fri, 30 Aug 2019 16:01:19 +0200 Subject: [PATCH] fix formatting fix crash iOS9 --- ios/Video/RCTVideo.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ios/Video/RCTVideo.m b/ios/Video/RCTVideo.m index 2791654c..23a1308c 100644 --- a/ios/Video/RCTVideo.m +++ b/ios/Video/RCTVideo.m @@ -88,8 +88,7 @@ static int const RCTVideoUnset = -1; { if ((self = [super init])) { _eventDispatcher = eventDispatcher; - - _automaticallyWaitsToMinimizeStalling = YES; + _automaticallyWaitsToMinimizeStalling = YES; _playbackRateObserverRegistered = NO; _isExternalPlaybackActiveObserverRegistered = NO; _playbackStalled = NO; @@ -378,7 +377,9 @@ static int const RCTVideoUnset = -1; _isExternalPlaybackActiveObserverRegistered = YES; [self addPlayerTimeObserver]; - [self setAutomaticallyWaitsToMinimizeStalling:_automaticallyWaitsToMinimizeStalling]; + if (@available(iOS 10.0, *)) { + [self setAutomaticallyWaitsToMinimizeStalling:_automaticallyWaitsToMinimizeStalling]; + } //Perform on next run loop, otherwise onVideoLoadStart is nil if (self.onVideoLoadStart) {