Skip to content

Commit

Permalink
Merged, but text sideloading is not working
Browse files Browse the repository at this point in the history
  • Loading branch information
ashnfb committed Jul 10, 2018
1 parent ea7bc15 commit 0d32a31
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions ios/RCTVideo.m
Original file line number Diff line number Diff line change
Expand Up @@ -311,20 +311,18 @@ - (void)setSrc:(NSDictionary *)source

[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;
}
Expand Down

0 comments on commit 0d32a31

Please sign in to comment.