Marino Faggiana 1 年之前
父节点
当前提交
783b0de97d

+ 2 - 1
iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayer.swift

@@ -90,7 +90,7 @@ class NCPlayer: NSObject {
         }
 
         player.play()
-        //player.position = position
+        player.position = position
 
         if autoplay {
             pauseAfterPlay = false
@@ -238,6 +238,7 @@ extension NCPlayer: VLCMediaPlayerDelegate {
             print("Played mode: ERROR")
             break
         case .playing:
+            playerToolBar?.playerView(hidden: false)
             if pauseAfterPlay {
                 player.pause()
                 pauseAfterPlay = false

+ 7 - 0
iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayerToolBar.swift

@@ -127,6 +127,8 @@ class NCPlayerToolBar: UIView {
             self.viewerMediaPage = viewerMediaPage
         }
 
+        playerView(hidden: true)
+        
         playButton.setImage(NCUtility.shared.loadImage(named: "play.fill", color: .white, symbolConfiguration: UIImage.SymbolConfiguration(pointSize: pointSize)), for: .normal)
         MPNowPlayingInfoCenter.default().nowPlayingInfo?[MPNowPlayingInfoPropertyPlaybackRate] = 0
 
@@ -167,6 +169,11 @@ class NCPlayerToolBar: UIView {
         self.audioButton.isEnabled = !audioTrackIndexes.isEmpty
     }
 
+    public func playerView(hidden: Bool) {
+
+        playerButtonView.isHidden = hidden
+    }
+
     // MARK: -
 
     public func show() {