Skip to content

Commit

Permalink
Fix #120, remove all observers when deprecate player
Browse files Browse the repository at this point in the history
  • Loading branch information
saiday committed Jun 2, 2016
1 parent a1526ad commit b452cdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion HysteriaPlayer/HysteriaPlayer.m
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ - (void)deprecatePlayer
[[AVAudioSession sharedInstance] setActive:NO error:&error];
[[UIApplication sharedApplication] endReceivingRemoteControlEvents];
#endif
[[NSNotificationCenter defaultCenter]removeObserver:self name:AVPlayerItemDidPlayToEndTimeNotification object:nil];
[[NSNotificationCenter defaultCenter] removeObserver:self];

[self.audioPlayer removeObserver:self forKeyPath:@"status" context:nil];
[self.audioPlayer removeObserver:self forKeyPath:@"rate" context:nil];
Expand Down

0 comments on commit b452cdc

Please sign in to comment.