浏览代码

clear code

marinofaggiana 4 年之前
父节点
当前提交
e686880430
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      iOSClient/Viewer/NCViewerImageAudioVideo/NCVideoViewController.swift

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

@@ -41,9 +41,11 @@ class NCVideoViewController: AVPlayerViewController {
         }
         
         if let videoURL = videoURL {
+            
             let video = AVPlayer(url: videoURL)
             player = video
         
+            // At end go back to start
             NotificationCenter.default.addObserver(forName: .AVPlayerItemDidPlayToEndTime, object: nil, queue: nil) { (notification) in
                 let player = notification.object as! AVPlayerItem
                 player.seek(to: CMTime.zero, completionHandler: nil)