Skip to content

Commit

Permalink
Removing the call to observeValueForKeyPath:ofObject:change:context: …
Browse files Browse the repository at this point in the history
…on super from RCTVideo.

If the super class is not actually observing the key, the app will crash. Checking to see if
the super class responds to this selector doesn't solve this issue.

react-native-video github issue: TheWidlarzGroup#1515

Discussion about this particular problem: https://stackoverflow.com/questions/6574714/whats-wrong-with-this-observevalueforkeypathofobjectchangecontext-implement
  • Loading branch information
Nahuel Marisi committed Aug 20, 2019
1 parent c29244b commit 7a9081d
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions ios/Video/RCTVideo.m
Original file line number Diff line number Diff line change
Expand Up @@ -712,8 +712,6 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(N

return;
}
} else if ([super respondsToSelector:@selector(observeValueForKeyPath:ofObject:change:context:)]) {
[super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
}
}

Expand Down

0 comments on commit 7a9081d

Please sign in to comment.