Browse Source

added notificationCenterShowPlayerToolBar

marinofaggiana 3 years ago
parent
commit
7b0d88a0f8

+ 1 - 0
iOSClient/NCGlobal.swift

@@ -325,6 +325,7 @@ class NCGlobal: NSObject {
     let notificationCenterDownloadedThumbnail                   = "DownloadedThumbnail"             // userInfo: ocId
     
     let notificationCenterHidePlayerToolBar                     = "hidePlayerToolBar"               // userInfo: ocId
+    let notificationCenterShowPlayerToolBar                     = "showPlayerToolBar"               // userInfo: ocId, enableTimerAutoHide
 }
 
 //let rootView = UIApplication.shared.keyWindow?.rootViewController?.view

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

@@ -270,8 +270,9 @@ extension NCPlayer: AVPictureInPictureControllerDelegate {
     }
     
     func pictureInPictureControllerDidStopPictureInPicture(_ pictureInPictureController: AVPictureInPictureController) {
-        // nothing
+
         if !isPlay() {
+            playerToolBar?.show(enableTimerAutoHide: false)
         }
     }
 }

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

@@ -174,10 +174,7 @@ class NCPlayerToolBar: UIView {
         }
         
         if !self.isHidden { return }
-//        if let detailView = detailView {
-//            if detailView.isShow() { return }
-//        }
-        
+
         updateToolBar()
             
         UIView.animate(withDuration: 0.3, animations: {