소스 검색

removed pip limit

Signed-off-by: marinofaggiana <marino@marinofaggiana.com>
marinofaggiana 3 년 전
부모
커밋
a498e84d0c
2개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 4 2
      iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayer.swift
  2. 1 1
      iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayerToolBar.swift

+ 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 {