marinofaggiana 4 жил өмнө
parent
commit
0e2ad91fc2

+ 2 - 0
iOSClient/Viewer/NCViewerImageAudioVideo/NCVideoViewController.swift

@@ -47,11 +47,13 @@ class NCVideoViewController: AVPlayerViewController {
         
         
             // At end go back to start
             // At end go back to start
             NotificationCenter.default.addObserver(forName: .AVPlayerItemDidPlayToEndTime, object: nil, queue: nil) { (notification) in
             NotificationCenter.default.addObserver(forName: .AVPlayerItemDidPlayToEndTime, object: nil, queue: nil) { (notification) in
+                
                 let player = notification.object as! AVPlayerItem
                 let player = notification.object as! AVPlayerItem
                 player.seek(to: CMTime.zero, completionHandler: nil)
                 player.seek(to: CMTime.zero, completionHandler: nil)
             }
             }
         
         
             player?.addObserver(self, forKeyPath: "rate", options: [], context: nil)
             player?.addObserver(self, forKeyPath: "rate", options: [], context: nil)
+            
             player?.play()
             player?.play()
         }
         }
     }
     }