Skip to content

Commit

Permalink
fix #107
Browse files Browse the repository at this point in the history
  • Loading branch information
BrikerMan committed May 24, 2017
1 parent ef78f2f commit 2c509d9
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Source/BMPlayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,15 @@ extension BMPlayer: BMPlayerLayerViewDelegate {
if !isPauseByUser {
play()
}
if shouldSeekTo != 0 {
seek(shouldSeekTo, completion: {
if !self.isPauseByUser {
self.play()
} else {
self.pause()
}
})
}

case BMPlayerState.bufferFinished:
autoPlay()
Expand Down Expand Up @@ -497,7 +506,7 @@ extension BMPlayer: BMPlayerControlViewDelegate {
pause()
} else {
if isPlayToTheEnd {
seek(0, completion: {
seek(0, completion: {
self.play()
})
controlView.hidePlayToTheEndView()
Expand Down Expand Up @@ -534,7 +543,7 @@ extension BMPlayer: BMPlayerControlViewDelegate {

if isPlayToTheEnd {
isPlayToTheEnd = false
seek(target, completion: {
seek(target, completion: {
self.play()
})
controlView.hidePlayToTheEndView()
Expand Down

0 comments on commit 2c509d9

Please sign in to comment.