Skip to content

Commit 3bb8d22

Browse files
cobarxBeau Ner
authored andcommitted
Merge pull request TheWidlarzGroup#1246 from niklassaers/master
Instead of crashing, show a warning and return (rebased from commit f69231f)
1 parent 943af0a commit 3bb8d22

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ios/Video/RCTVideo.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,10 @@ - (void)playerItemForSource:(NSDictionary *)source
743743
NSString *audioUri = [audio objectForKey:@"uri"]; // ZL
744744
uri = @"http://192.168.2.228:8987/piss.mp4"; // ZL
745745
NSString *type = [source objectForKey:@"type"];
746+
if (!uri || [uri isEqualToString:@""]) {
747+
DebugLog(@"Could not find video URL in source '%@'", source);
748+
return;
749+
}
746750

747751
NSURL *url = isNetwork || isAsset
748752
? [NSURL URLWithString:uri]

0 commit comments

Comments
 (0)