Browse Source

coding

Signed-off-by: marinofaggiana <marino@marinofaggiana.com>
marinofaggiana 3 years ago
parent
commit
60cc902156
1 changed files with 2 additions and 4 deletions
  1. 2 4
      iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayerToolBar.swift

+ 2 - 4
iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayerToolBar.swift

@@ -220,7 +220,6 @@ class NCPlayerToolBar: UIView {
     public func updateToolBar(timeSeek: CMTime? = nil) {
         guard let metadata = self.metadata else { return }
         
-        var namedPlay = "play.fill"
         var currentTime = appDelegate.player?.currentTime() ?? .zero
         currentTime = currentTime.convertScale(1000, method: .default)
         
@@ -262,14 +261,13 @@ class NCPlayerToolBar: UIView {
             backButton.setImage(NCUtility.shared.loadImage(named: "gobackward.10", color: .white, size: 30), for: .normal)
         }
         backButton.isEnabled = true
-        
+                        
         if let ncplayer = ncplayer, ncplayer.isPlay() {
-            namedPlay = "pause.fill"
             MPNowPlayingInfoCenter.default().nowPlayingInfo?[MPNowPlayingInfoPropertyPlaybackRate] = 1
         } else {
             MPNowPlayingInfoCenter.default().nowPlayingInfo?[MPNowPlayingInfoPropertyPlaybackRate] = 0
         }
-        
+        let namedPlay = (ncplayer?.isPlay() ?? false) ? "pause.fill" : "play.fill"
         if #available(iOS 13.0, *) {
             playButton.setImage(NCUtility.shared.loadImage(named: namedPlay, color: .white, symbolConfiguration: UIImage.SymbolConfiguration(pointSize: 30)), for: .normal)
         } else {