Merge pull request #762 from mpretty-cyro/fix/set-max-video-file-size

Set max video file size
pull/769/head
RyanZhao 2 years ago committed by GitHub
commit 1d5f5a0150
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -6,6 +6,7 @@ import Foundation
import AVFoundation
import PromiseKit
import CoreServices
import SessionMessagingKit
protocol PhotoCaptureDelegate: AnyObject {
func photoCapture(_ photoCapture: PhotoCapture, didFinishProcessingAttachment attachment: SignalAttachment)
@ -463,6 +464,9 @@ class CaptureOutput {
// leaving it enabled causes all audio to be lost on videos longer
// than the default length (10s).
movieOutput.movieFragmentInterval = CMTime.invalid
// Ensure the recorded movie can't go over the maximum file server size
movieOutput.maxRecordedFileSize = Int64(FileServerAPI.maxFileSize)
}
var photoOutput: AVCaptureOutput? {

Loading…
Cancel
Save