Marino Faggiana 1 gadu atpakaļ
vecāks
revīzija
528250faf6

+ 8 - 0
iOSClient/Viewer/NCViewerMedia/NCViewerMedia.swift

@@ -204,6 +204,14 @@ class NCViewerMedia: UIViewController {
         self.tipView?.dismiss()
     }
 
+    override func viewDidDisappear(_ animated: Bool) {
+        super.viewDidDisappear(animated)
+
+        if let ncplayer = ncplayer, ncplayer.isPlay() {
+            ncplayer.playerPause()
+        }
+    }
+
     override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
         super.viewWillTransition(to: size, with: coordinator)
 

+ 0 - 4
iOSClient/Viewer/NCViewerMedia/NCViewerMediaPage.swift

@@ -161,10 +161,6 @@ class NCViewerMediaPage: UIViewController {
     override func viewDidDisappear(_ animated: Bool) {
         super.viewDidDisappear(animated)
 
-        if let ncplayer = currentViewController.ncplayer, ncplayer.isPlay() {
-            ncplayer.playerPause()
-        }
-        clearCommandCenter()
         timerAutoHide?.invalidate()
     }