Browse Source

improved pip

Signed-off-by: marinofaggiana <marino@marinofaggiana.com>
marinofaggiana 3 years ago
parent
commit
d137545266
1 changed files with 32 additions and 32 deletions
  1. 32 32
      iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayerToolBar.swift

+ 32 - 32
iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayerToolBar.swift

@@ -353,38 +353,6 @@ class NCPlayerToolBar: UIView {
         }
     }
     
-    func forward() {
-        
-        var index: Int = 0
-        
-        if let currentIndex = self.viewerMedia?.currentIndex, let metadatas = self.viewerMedia?.metadatas, let ncplayer = self.ncplayer {
-        
-            if currentIndex == metadatas.count - 1 {
-                index = 0
-            } else {
-                index = currentIndex + 1
-            }
-            
-            self.viewerMedia?.goTo(index: index, direction: .forward, autoPlay: ncplayer.isPlay())
-        }
-    }
-    
-    func backward() {
-        
-        var index: Int = 0
-
-        if let currentIndex = self.viewerMedia?.currentIndex, let metadatas = self.viewerMedia?.metadatas, let ncplayer = self.ncplayer {
-            
-            if currentIndex == 0 {
-                index = metadatas.count - 1
-            } else {
-                index = currentIndex - 1
-            }
-            
-            self.viewerMedia?.goTo(index: index, direction: .reverse, autoPlay: ncplayer.isPlay())
-        }
-    }
-    
     //MARK: - Event / Gesture
     
     @objc func onSliderValChanged(slider: UISlider, event: UIEvent) {
@@ -511,6 +479,38 @@ class NCPlayerToolBar: UIView {
         }
         */
     }
+    
+    func forward() {
+        
+        var index: Int = 0
+        
+        if let currentIndex = self.viewerMedia?.currentIndex, let metadatas = self.viewerMedia?.metadatas, let ncplayer = self.ncplayer {
+        
+            if currentIndex == metadatas.count - 1 {
+                index = 0
+            } else {
+                index = currentIndex + 1
+            }
+            
+            self.viewerMedia?.goTo(index: index, direction: .forward, autoPlay: ncplayer.isPlay())
+        }
+    }
+    
+    func backward() {
+        
+        var index: Int = 0
+
+        if let currentIndex = self.viewerMedia?.currentIndex, let metadatas = self.viewerMedia?.metadatas, let ncplayer = self.ncplayer {
+            
+            if currentIndex == 0 {
+                index = metadatas.count - 1
+            } else {
+                index = currentIndex - 1
+            }
+            
+            self.viewerMedia?.goTo(index: index, direction: .reverse, autoPlay: ncplayer.isPlay())
+        }
+    }
 }
 
 extension NCPlayerToolBar: AVPictureInPictureControllerDelegate {