diff --git a/MobilePlayer/MobilePlayerViewController.swift b/MobilePlayer/MobilePlayerViewController.swift index 37d840d..58612a3 100644 --- a/MobilePlayer/MobilePlayerViewController.swift +++ b/MobilePlayer/MobilePlayerViewController.swift @@ -469,9 +469,6 @@ public class MobilePlayerViewController: MPMoviePlayerViewController { isFirstPlay = false controlsView.previewImageView.hidden = true controlsView.activityIndicatorView.stopAnimating() - guard let durationLabel = getViewForElementWithIdentifier("duration") as? Label else { return } - durationLabel.text = textForPlaybackTime(moviePlayer.duration) - durationLabel.superview?.setNeedsLayout() } } @@ -497,6 +494,10 @@ public class MobilePlayerViewController: MPMoviePlayerViewController { remainingTimeLabel.text = "-\(textForPlaybackTime(moviePlayer.duration - moviePlayer.currentPlaybackTime))" remainingTimeLabel.superview?.setNeedsLayout() } + if let durationLabel = getViewForElementWithIdentifier("duration") as? Label { + durationLabel.text = textForPlaybackTime(moviePlayer.duration) + durationLabel.superview?.setNeedsLayout() + } updateShownTimedOverlays() }