Browse Source

improved pip

Signed-off-by: marinofaggiana <marino@marinofaggiana.com>
marinofaggiana 3 years ago
parent
commit
f4be46c222

+ 5 - 1
iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayerToolBar.swift

@@ -321,7 +321,6 @@ class NCPlayerToolBar: UIView {
 
         if seconds > 0 {
             newTime = CMTimeAdd(currentTime, timeToAdd)
-            
             if newTime < ncplayer.durationTime {
                 ncplayer.videoSeek(time: newTime)
             } else if newTime >= ncplayer.durationTime {
@@ -353,6 +352,11 @@ class NCPlayerToolBar: UIView {
         }
     }
     
+    func stopTimerAutoHide() {
+        
+        timerAutoHide?.invalidate()
+    }
+    
     //MARK: - Event / Gesture
     
     @objc func onSliderValChanged(slider: UISlider, event: UIEvent) {

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

@@ -118,12 +118,13 @@ class NCViewerMedia: UIViewController {
             ncplayer.playerPause()
             ncplayer.saveCurrentTime()
         }
-        
+        currentViewController.playerToolBar.stopTimerAutoHide()
         clearCommandCenter()
         
         metadatas.removeAll()
         ncplayerLivePhoto = nil
         
+        // Remove Observer
         NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterDeleteFile), object: nil)
         NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterRenameFile), object: nil)
         NotificationCenter.default.removeObserver(self, name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterMoveFile), object: nil)