title: AVFoundation videoZoomFactor not working (Swift)
body: <p>All of the camera tweaks I am wanting to use are working except the zoomfactor. I am lost as to why this is happening...any ideas? The custom exposure and focus settings work fine. Did something change in iOS that im not aware of?</p>
  
  <pre><code>captureSession = AVCaptureSession()
      captureSession?.sessionPreset = AVCaptureSessionPresetPhoto
      stillImageOutput = AVCapturePhotoOutput()
  
      let device = AVCaptureDevice.defaultDevice(withMediaType: AVMediaTypeVideo)
  
      do{
          do{
              try device?.lockForConfiguration()
              device?.setFocusModeLockedWithLensPosition(focusValue, completionHandler: {(time) -&gt; Void in})
              device?.setExposureModeCustomWithDuration(CMTimeMake(1, exposureValue), iso: ISOValue, completionHandler: {(time) -&gt; Void in})
              let zoomFactor:CGFloat = 16
              device?.videoZoomFactor = zoomFactor
              device?.unlockForConfiguration()
  
          }catch{
              print(error)
          }
  
          stillImageOutput.isHighResolutionCaptureEnabled = true
          let input = try AVCaptureDeviceInput(device: device)
          if(captureSession.canAddInput(input)){
              captureSession.addInput(input)
              if(captureSession.canAddOutput(stillImageOutput)){
                  captureSession.addOutput(stillImageOutput)
  
                  captureSession.startRunning()
                  let captureVideoLayer: AVCaptureVideoPreviewLayer = AVCaptureVideoPreviewLayer.init(session: captureSession)
                  captureVideoLayer.frame = self.previewView.bounds
                  captureVideoLayer.videoGravity = AVLayerVideoGravityResizeAspectFill
                  self.previewView.layer.insertSublayer(captureVideoLayer, at: 0)
              }
          }
      }catch{
          print(error)
      }
  </code></pre>