Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
changsanjiang committed Jul 11, 2022
1 parent 964ed04 commit b1f714d
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions SJBaseVideoPlayer/AliPlayer/Core/SJAliMediaPlayer.m
Original file line number Diff line number Diff line change
Expand Up @@ -219,14 +219,10 @@ - (void)pause {

- (void)replay {
_isReplayed = YES;
__weak typeof(self) _self = self;
[self seekToTime:kCMTimeZero completionHandler:^(BOOL finished) {
__strong typeof(_self) self = _self;
if ( !self ) return;
if ( self.playerStatus != AVPStatusStarted ) [self play];
[self _toEvaluating];
[self _postNotification:SJMediaPlayerDidReplayNotification];
}];
[self seekToTime:kCMTimeZero completionHandler:nil];
[self play];
[self _toEvaluating];
[self _postNotification:SJMediaPlayerDidReplayNotification];
}
- (void)report {
[self _postNotification:SJMediaPlayerAssetStatusDidChangeNotification];
Expand Down Expand Up @@ -375,6 +371,7 @@ - (void)_willSeeking:(CMTime)time {
self.isPlaybackFinished = NO;
_seekingInfo.time = time;
_seekingInfo.isSeeking = YES;
_playerStatus = AVPStatusPrepared;
}

- (void)_didEndSeeking:(BOOL)finished {
Expand Down

0 comments on commit b1f714d

Please sign in to comment.