Skip to content

Commit

Permalink
[MobilePlayerViewController] Dismiss postroll when playback starts
Browse files Browse the repository at this point in the history
Fixes sahin#97
  • Loading branch information
isair committed Dec 10, 2015
1 parent d6355c2 commit 1961cd4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions MobilePlayer/MobilePlayerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ public class MobilePlayerViewController: MPMoviePlayerViewController {
userInfo: [MobilePlayerErrorUserInfoKey: error])
}
if let postrollVC = self.postrollViewController {
self.prerollViewController?.dismiss()
self.pauseOverlayViewController?.dismiss()
self.showOverlayViewController(postrollVC)
}
}
Expand Down Expand Up @@ -537,6 +539,7 @@ public class MobilePlayerViewController: MPMoviePlayerViewController {
}
prerollViewController?.dismiss()
pauseOverlayViewController?.dismiss()
postrollViewController?.dismiss()
} else {
playButton?.toggled = false
hideControlsTimer?.invalidate()
Expand Down

0 comments on commit 1961cd4

Please sign in to comment.