marinofaggiana 4 years ago
parent
commit
c51319fea4
2 changed files with 6 additions and 1 deletions
  1. 5 0
      iOSClient/Utility/NCContentPresenter.swift
  2. 1 1
      iOSClient/Utility/NCLivePhoto.swift

+ 5 - 0
iOSClient/Utility/NCContentPresenter.swift

@@ -51,6 +51,11 @@ class NCContentPresenter: NSObject {
     
     @objc func messageNotification(_ title: String, description: String?, delay: TimeInterval, type: messageType, errorCode: Int) {
                        
+        // No notification message
+        if errorCode == -999 { return }
+        else if errorCode == 0 { return }
+        
+        // No repeat message 
         if errorCode == lastErrorCode {
             if errorCode ==  Int(CFNetworkErrors.cfurlErrorNotConnectedToInternet.rawValue) { return }
         } else {

+ 1 - 1
iOSClient/Utility/NCLivePhoto.swift

@@ -208,7 +208,7 @@ class NCLivePhoto {
             let videoReaderOutput = AVAssetReaderTrackOutput(track: videoTrack, outputSettings: videoReaderSettings)
             videoReader?.add(videoReaderOutput)
             // Create Video Writer Input
-            let videoWriterInput = AVAssetWriterInput(mediaType: .video, outputSettings: [AVVideoCodecKey : AVVideoCodecH264, AVVideoWidthKey : videoTrack.naturalSize.width, AVVideoHeightKey : videoTrack.naturalSize.height])
+            let videoWriterInput = AVAssetWriterInput(mediaType: .video, outputSettings: [AVVideoCodecKey : AVVideoCodecType.h264, AVVideoWidthKey : videoTrack.naturalSize.width, AVVideoHeightKey : videoTrack.naturalSize.height])
             videoWriterInput.transform = videoTrack.preferredTransform
             videoWriterInput.expectsMediaDataInRealTime = true
             assetWriter?.add(videoWriterInput)