소스 검색

Improvements

marinofaggiana 4 년 전
부모
커밋
02fc31a065
2개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 0
      iOSClient/Viewer/NCViewerImage/NCViewerImage.swift
  2. 1 1
      iOSClient/Viewer/NCViewerVideo/NCViewerVideo.swift

+ 3 - 0
iOSClient/Viewer/NCViewerImage/NCViewerImage.swift

@@ -784,5 +784,8 @@ extension NCViewerImage: NCViewerVideoDelegate {
     
     func stopPictureInPicture(metadata: tableMetadata, playing: Bool) {
         pictureInPictureOcId = ""
+        if playing && currentMetadata.ocId == metadata.ocId {
+            playerPlay()
+        }
     }
 }

+ 1 - 1
iOSClient/Viewer/NCViewerVideo/NCViewerVideo.swift

@@ -108,7 +108,7 @@ extension NCViewerVideo: AVPlayerViewControllerDelegate {
         delegateViewerVideo?.startPictureInPicture(metadata: metadata)
     }
     
-    func playerViewControllerDidStopPictureInPicture(_ playerViewController: AVPlayerViewController) {
+    func playerViewControllerWillStopPictureInPicture(_ playerViewController: AVPlayerViewController) {
         NCManageDatabase.sharedInstance.addVideoTime(account: metadata.account, ocId: metadata.ocId, time: player?.currentTime())
         pictureInPicture = false
         let playing = player?.timeControlStatus == .playing