Skip to content

Commit

Permalink
Merge pull request BradLarson#260 from ShopHush/camera-warnings
Browse files Browse the repository at this point in the history
Fix AVMediaType Swift 4 Error
  • Loading branch information
BradLarson authored Jul 24, 2018
2 parents 33db0e9 + 9754532 commit 309e402
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions framework/Source/iOS/Camera.swift
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ public class Camera: NSObject, ImageSource, AVCaptureVideoDataOutputSampleBuffer

var captureConnection: AVCaptureConnection!
for connection in videoOutput.connections {
for port in (connection as! AVCaptureConnection).inputPorts {
if (port as AnyObject).mediaType == AVMediaTypeVideo {
captureConnection = connection as? AVCaptureConnection
for port in connection.inputPorts {
if port.mediaType == AVMediaType.video {
captureConnection = connection
captureConnection.isVideoMirrored = location == .frontFacing
}
}
Expand Down

0 comments on commit 309e402

Please sign in to comment.