Browse Source

Update NCPlayer.swift

Marino Faggiana 2 years ago
parent
commit
3093123923
1 changed files with 2 additions and 2 deletions
  1. 2 2
      iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayer.swift

+ 2 - 2
iOSClient/Viewer/NCViewerMedia/NCPlayer/NCPlayer.swift

@@ -162,9 +162,9 @@ class NCPlayer: NSObject {
 
 
     func savePosition() {
     func savePosition() {
 
 
-        guard let position = player?.position, metadata.classFile == NKCommon.TypeClassFile.video.rawValue else { return }
+        guard let position = player?.position, metadata.classFile == NKCommon.TypeClassFile.video.rawValue, isPlay() else { return }
 
 
-        if isPlay(), let width = width, let height = height {
+        if let width = width, let height = height {
             player?.saveVideoSnapshot(at: fileNamePreviewLocalPath, withWidth: Int32(width), andHeight: Int32(height))
             player?.saveVideoSnapshot(at: fileNamePreviewLocalPath, withWidth: Int32(width), andHeight: Int32(height))
         }
         }