浏览代码

Improvements

marinofaggiana 4 年之前
父节点
当前提交
02fc31a065

+ 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