Skip to content

Commit

Permalink
[MobilePlayerViewController] Fix duration label visibility
Browse files Browse the repository at this point in the history
Fixes sahin#96
  • Loading branch information
isair committed Dec 10, 2015
1 parent a013184 commit eb663eb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions MobilePlayer/MobilePlayerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}

Expand All @@ -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()
}

Expand Down

0 comments on commit eb663eb

Please sign in to comment.