Skip to content

Commit

Permalink
Merge pull request TheWidlarzGroup#1246 from niklassaers/master
Browse files Browse the repository at this point in the history
Instead of crashing, show a warning and return
  • Loading branch information
cobarx authored Feb 19, 2019
2 parents 98eb7a3 + 075dfba commit f69231f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ios/Video/RCTVideo.m
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,10 @@ - (void)playerItemForSource:(NSDictionary *)source withCallback:(void(^)(AVPlaye
bool shouldCache = [RCTConvert BOOL:[source objectForKey:@"shouldCache"]];
NSString *uri = [source objectForKey:@"uri"];
NSString *type = [source objectForKey:@"type"];
if (!uri || [uri isEqualToString:@""]) {
DebugLog(@"Could not find video URL in source '%@'", source);
return;
}

NSURL *url = isNetwork || isAsset
? [NSURL URLWithString:uri]
Expand Down

0 comments on commit f69231f

Please sign in to comment.