title: Display AVCaptureDevice live stream video in Mac Os with Swift
body: <p>I would like to display a live stream video from my iSight camera.</p>
  
  <p>I was able to detect the AVCaptureDevice that match with the iSight camera, but I don't know how can display the iSight live stream.</p>
  
  <p>I found some examples for iOS (<a href="http://jamesonquave.com/blog/taking-control-of-the-iphone-camera-in-ios-8-with-swift-part-1/" rel="nofollow">http://jamesonquave.com/blog/taking-control-of-the-iphone-camera-in-ios-8-with-swift-part-1/</a>), however I want to achieve the same objective for a Mac OS application.</p>
  
  <p>I also checked in the Apple documentation, but unfortunately some of the methods examples are not available for Swift.</p>
  
  <p>Where should I add the AVCaptureVideoPreviewLayer? Over a CustomView? Or maybe IKCameraDeviceView?</p>
  
  <p>Or can somebody provide me an example about how to use the iSight camera with Swift in Mac Os?</p>