Marino Faggiana 2 年之前
父節點
當前提交
e1d36fafb1

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

@@ -223,6 +223,8 @@ extension NCPlayer: VLCMediaPlayerDelegate {
             playerToolBar?.update(position: player.position)
             break
         case .error:
+            let error = NKError(errorCode: NCGlobal.shared.errorInternalError, errorDescription: "_error_something_wrong_")
+            NCContentPresenter.shared.showError(error: error, priority: .max)
             print("Played mode: ERROR")
             break
         case .playing:

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

@@ -106,7 +106,7 @@ class NCPlayerToolBar: UIView {
 
         backButton.setImage(NCUtility.shared.loadImage(named: "gobackward.10", color: .lightGray), for: .normal)
         backButton.isEnabled = false
-        
+
         forwardButton.setImage(NCUtility.shared.loadImage(named: "goforward.10", color: .lightGray), for: .normal)
         forwardButton.isEnabled = false
     }
@@ -383,13 +383,3 @@ class NCPlayerToolBar: UIView {
         }
     }
 }
-
-extension NCPlayerToolBar: AVPictureInPictureControllerDelegate {
-
-    func pictureInPictureControllerDidStopPictureInPicture(_ pictureInPictureController: AVPictureInPictureController) {
-
-        if let metadata = self.metadata, let ncplayer = self.ncplayer, !ncplayer.isPlay() {
-            NotificationCenter.default.postOnMainThread(name: NCGlobal.shared.notificationCenterShowPlayerToolBar, userInfo: ["ocId": metadata.ocId, "enableTimerAutoHide": false])
-        }
-    }
-}