瀏覽代碼

Update NCPlayer.swift

Marino Faggiana 2 年之前
父節點
當前提交
3093123923
共有 1 個文件被更改,包括 2 次插入2 次删除
  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() {
 
-        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))
         }