Skip to content

Commit

Permalink
[f] Allow to change isVideoMirrored option for front camera
Browse files Browse the repository at this point in the history
  • Loading branch information
Buu Bui + Chau Vo committed Oct 4, 2017
1 parent a3a8c6e commit 66eed0f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Source/SwiftyCamViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,10 @@ open class SwiftyCamViewController: UIViewController {
/// Sets whether or not video recordings will record audio
/// Setting to true will prompt user for access to microphone on View Controller launch.
public var audioEnabled = true


/// Set video mirror for front camera
public var frontCameraMirrored = true

/// Public access to Pinch Gesture
fileprivate(set) public var pinchGesture : UIPinchGestureRecognizer!

Expand Down Expand Up @@ -488,9 +491,9 @@ open class SwiftyCamViewController: UIViewController {
let movieFileOutputConnection = self.movieFileOutput?.connection(withMediaType: AVMediaTypeVideo)


//flip video output if front facing camera is selected
// set isVideoMirrored if front facing camera is selected
if self.currentCamera == .front {
movieFileOutputConnection?.isVideoMirrored = true
movieFileOutputConnection?.isVideoMirrored = self.frontCameraMirrored
}

movieFileOutputConnection?.videoOrientation = self.getVideoOrientation()
Expand Down

0 comments on commit 66eed0f

Please sign in to comment.