Skip to content

Commit

Permalink
Bring back audio in recordings longer than 10 seconds
Browse files Browse the repository at this point in the history
Just another Apple bug

Fixes wulkano/Kap#124
  • Loading branch information
sindresorhus committed Jan 31, 2017
1 parent 990411f commit 6e6daf4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions swift/aperture/Recorder.swift
Expand Up @@ -44,6 +44,10 @@ class Recorder: NSObject, AVCaptureFileOutputRecordingDelegate {

self.output = AVCaptureMovieFileOutput();

// Needed because otherwise there is no audio on videos longer than 10 seconds
// http://stackoverflow.com/a/26769529/64949
self.output?.movieFragmentInterval = kCMTimeInvalid

if ((self.session?.canAddOutput(self.output)) != nil) {
self.session?.addOutput(self.output);
} else {
Expand Down

0 comments on commit 6e6daf4

Please sign in to comment.