Browse Source

clear code

marinofaggiana 4 years ago
parent
commit
e686880430

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

@@ -41,9 +41,11 @@ class NCVideoViewController: AVPlayerViewController {
         }
         }
         
         
         if let videoURL = videoURL {
         if let videoURL = videoURL {
+            
             let video = AVPlayer(url: videoURL)
             let video = AVPlayer(url: videoURL)
             player = video
             player = video
         
         
+            // 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)