From 7a9081d5afc2ef2b0ba0ee01d7d7912bcafa0cb5 Mon Sep 17 00:00:00 2001 From: Nahuel Marisi Date: Tue, 20 Aug 2019 09:37:49 +0200 Subject: [PATCH 1/2] Removing the call to observeValueForKeyPath:ofObject:change:context: 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: https://github.com/react-native-community/react-native-video/issues/1515 Discussion about this particular problem: https://stackoverflow.com/questions/6574714/whats-wrong-with-this-observevalueforkeypathofobjectchangecontext-implement --- ios/Video/RCTVideo.m | 2 -- 1 file changed, 2 deletions(-) diff --git a/ios/Video/RCTVideo.m b/ios/Video/RCTVideo.m index 4710afaa5a..98cb0737e0 100644 --- a/ios/Video/RCTVideo.m +++ b/ios/Video/RCTVideo.m @@ -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]; } } From 923bc59b7c6217f249c7ec780a5286663149ff55 Mon Sep 17 00:00:00 2001 From: Nahuel Marisi Date: Tue, 20 Aug 2019 10:23:52 +0200 Subject: [PATCH 2/2] Updated CHANGELOG to reflect bug fix in PR 1720 --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48f1b80516..9105a1ba2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,13 @@ ## Changelog +### Version 5.0.1 +* Fix crash when RCTVideo's superclass doesn't observe the keyPath 'frame' (iOS) [#1720](https://github.com/react-native-community/react-native-video/pull/1720) + ### Version 5.0.0 * AndroidX Support ### Version 4.4.4 * Handle racing conditions when props are setted on exoplayer - ### Version 4.4.3 * Fix mute/unmute when controls are present (iOS) [#1654](https://github.com/react-native-community/react-native-video/pull/1654) * Fix Android videos being able to play with background music/audio from other apps.