Przeglądaj źródła

removed pip limit

Signed-off-by: marinofaggiana <marino@marinofaggiana.com>
marinofaggiana 3 lat temu
rodzic
commit
a498e84d0c

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

@@ -101,7 +101,7 @@ class NCPlayer: NSObject {
                         }
                         
                         // PIP
-                        if let playerLayer = self.videoLayer, CCUtility.fileProviderStorageExists(metadata.ocId, fileNameView: metadata.fileNameView), metadata.livePhoto == false {
+                        if let playerLayer = self.videoLayer, metadata.livePhoto == false {
                             self.pictureInPictureController = AVPictureInPictureController(playerLayer: playerLayer)
                             self.pictureInPictureController?.delegate = self
                         }
@@ -201,7 +201,9 @@ class NCPlayer: NSObject {
     @objc func applicationDidEnterBackground(_ notification: NSNotification) {
         
         if metadata?.classFile == NCCommunicationCommon.typeClassFile.video.rawValue {
-            if let pictureInPictureController = pictureInPictureController, pictureInPictureController.isPictureInPictureActive { return }
+            if let pictureInPictureController = pictureInPictureController, pictureInPictureController.isPictureInPictureActive {
+                return
+            }
             playerPause()
         }
     }

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

@@ -149,7 +149,7 @@ class NCPlayerToolBar: UIView {
         muteButton.isEnabled = true
         
         // PIP
-        if metadata.classFile == NCCommunicationCommon.typeClassFile.video.rawValue && CCUtility.fileProviderStorageExists(metadata.ocId, fileNameView: metadata.fileNameView) {
+        if metadata.classFile == NCCommunicationCommon.typeClassFile.video.rawValue {
             pipButton.setImage(NCUtility.shared.loadImage(named: "pip.enter", color: .white), for: .normal)
             pipButton.isEnabled = true
             if let playerLayer = ncplayer.videoLayer, ncplayer.pictureInPictureController == nil {