File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1226,6 +1226,11 @@ - (void)_playVideo:(NSURL *)videoURL atPhotoIndex:(NSUInteger)index {
1226
1226
1227
1227
- (void )videoFinishedCallback : (NSNotification *)aNotification {
1228
1228
1229
+ // Remove observer
1230
+ [[NSNotificationCenter defaultCenter ] removeObserver: self
1231
+ name: MPMoviePlayerPlaybackDidFinishNotification
1232
+ object: _currentVideoPlayerViewController.moviePlayer];
1233
+
1229
1234
// Dismiss with our modal transition
1230
1235
[self dismissViewControllerAnimated: YES completion: nil ];
1231
1236
@@ -1236,9 +1241,6 @@ - (void)videoFinishedCallback:(NSNotification*)aNotification {
1236
1241
1237
1242
- (void )clearCurrentVideo {
1238
1243
if (!_currentVideoPlayerViewController) return ;
1239
- [[NSNotificationCenter defaultCenter ] removeObserver: self
1240
- name: MPMoviePlayerPlaybackDidFinishNotification
1241
- object: _currentVideoPlayerViewController.moviePlayer];
1242
1244
[_currentVideoLoadingIndicator removeFromSuperview ];
1243
1245
_currentVideoPlayerViewController = nil ;
1244
1246
_currentVideoLoadingIndicator = nil ;
You can’t perform that action at this time.
0 commit comments