From 0d32a31b8547ebc95bcb33f3b9a25a0148dacd32 Mon Sep 17 00:00:00 2001 From: Ash Mishra Date: Mon, 9 Jul 2018 17:00:47 -0700 Subject: [PATCH] Merged, but text sideloading is not working --- ios/RCTVideo.m | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/ios/RCTVideo.m b/ios/RCTVideo.m index fe1e53f8..86842e96 100644 --- a/ios/RCTVideo.m +++ b/ios/RCTVideo.m @@ -311,20 +311,18 @@ static NSString *const timedMetadata = @"timedMetadata"; [self addPlayerTimeObserver]; - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ - - //Perform on next run loop, otherwise onVideoLoadStart is nil - if(self.onVideoLoadStart) { - id uri = [source objectForKey:@"uri"]; - id type = [source objectForKey:@"type"]; - self.onVideoLoadStart(@{@"src": @{ - @"uri": uri ? uri : [NSNull null], - @"type": type ? type : [NSNull null], - @"isNetwork": [NSNumber numberWithBool:(bool)[source objectForKey:@"isNetwork"]]}, - @"target": self.reactTag - }); - } - }); + //Perform on next run loop, otherwise onVideoLoadStart is nil + if(self.onVideoLoadStart) { + id uri = [source objectForKey:@"uri"]; + id type = [source objectForKey:@"type"]; + self.onVideoLoadStart(@{@"src": @{ + @"uri": uri ? uri : [NSNull null], + @"type": type ? type : [NSNull null], + @"isNetwork": [NSNumber numberWithBool:(bool)[source objectForKey:@"isNetwork"]]}, + @"target": self.reactTag + }); + } + }); _videoLoadStarted = YES; }