|
@@ -366,14 +366,6 @@ class NCViewerImage: UIViewController {
|
|
|
|
|
|
currentViewerImageZoom!.imageView.layer.addSublayer(videoLayer!)
|
|
|
|
|
|
- // At end go back to start
|
|
|
- NotificationCenter.default.addObserver(forName: .AVPlayerItemDidPlayToEndTime, object: player?.currentItem, queue: .main) { (notification) in
|
|
|
- if let item = notification.object as? AVPlayerItem, let currentItem = self.player?.currentItem, item == currentItem {
|
|
|
- self.player?.seek(to: CMTime.zero)
|
|
|
- NCManageDatabase.shared.addVideoTime(metadata: self.currentMetadata, time: CMTime.zero)
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
rateObserver = player?.addObserver(self, forKeyPath: "rate", options: [], context: nil)
|
|
|
|
|
|
if pictureInPictureOcId != metadata.ocId {
|
|
@@ -441,7 +433,7 @@ class NCViewerImage: UIViewController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- } else {
|
|
|
+ } else if !self.currentMetadata.livePhoto {
|
|
|
|
|
|
NCManageDatabase.shared.addVideoTime(metadata: self.currentMetadata, time: player?.currentTime())
|
|
|
print("Pause")
|