Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ipod-library support #926

Merged
merged 3 commits into from
Sep 4, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions ios/RCTVideo.m
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,10 @@ - (void)setProgressUpdateInterval:(float)progressUpdateInterval
- (void)removePlayerLayer
{
[_playerLayer removeFromSuperlayer];
[_playerLayer removeObserver:self forKeyPath:readyForDisplayKeyPath];
@try{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's triggering this crash? I'd like to fix the issue where we remove an observer that doesn't exist rather than putting a bandaid over it with try / catch.

[_playerLayer removeObserver:self forKeyPath:readyForDisplayKeyPath];
}@catch (NSException * e) {
}
_playerLayer = nil;
}

Expand Down Expand Up @@ -823,7 +826,10 @@ - (void)removeFromSuperview
{
[_player pause];
if (_playbackRateObserverRegistered) {
[_player removeObserver:self forKeyPath:playbackRate context:nil];
@try{
[_player removeObserver:self forKeyPath:playbackRate context:nil];
}@catch (NSException * e) {
}
_playbackRateObserverRegistered = NO;
}
_player = nil;
Expand Down