-
Notifications
You must be signed in to change notification settings - Fork 22
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
fix: send ended
when AVPlayerItem
ends
#253
Conversation
@@ -169,8 +175,7 @@ -(NSString *)getHostName:(NSString *)urlString { | |||
// This matters when there are multiple AVPlayer instances running simultaneously | |||
// | |||
- (BOOL) checkIfNotificationIsRelevant:(NSNotification *)notif { | |||
AVPlayerItem *notificationItem = (AVPlayerItem *)notif.object; | |||
return notificationItem == _playerItem; | |||
return notif.object == _playerItem; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to not make this isEqual:
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want instance equality here. We're checking that the notification is for the same instance of AVPlayerItem
that we're observing, since that's the object that's generating the events we are observing for.
No description provided.