Skip to content

Commit

Permalink
remove the duplicate performance of -dlc_videoWillStop
Browse files Browse the repository at this point in the history
  • Loading branch information
dklinzh committed Nov 30, 2016
1 parent fbdf72e commit 3bdb2ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DLCMobilePlayer/Classes/DLCBaseVideoView.m
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,8 @@ - (void)pause {
- (void)stop {
self.playing = NO;
dispatch_barrier_async(self.playerControlQueue, ^{
[self.mediaPlayer stop];
self.videoPlayed = NO;
[self.mediaPlayer stop];
});
}

Expand Down Expand Up @@ -647,7 +647,7 @@ - (void)mediaPlayerStateChanged:(NSNotification *)aNotification {
case VLCMediaPlayerStateError:
case VLCMediaPlayerStateStopped:
case VLCMediaPlayerStateEnded:
if ([self.videoActionDelegate respondsToSelector:@selector(dlc_videoWillStop)]) {
if ([self.videoActionDelegate respondsToSelector:@selector(dlc_videoWillStop)] && self.isVideoPlayed) {
[self.videoActionDelegate dlc_videoWillStop];
}
case VLCMediaPlayerStatePaused:
Expand Down

0 comments on commit 3bdb2ae

Please sign in to comment.