FAQ Database Discussion Community


iOS: AVCaptureDevicePosition, how to get from SCRecorder (error: Bad receiver type)

ios,objective-c,iphone,camera,avcapturedevice
I have some code, in objective-c, which is as follows: @interface SCRecorderPViewController () { SCRecorder *_recorder; UIImage *_photo; SCRecordSession *_recordSession; UIImageView *_ghostImageView; CGFloat screenWidth; CGFloat screenHeight; } And I want to get the active device/camera (whether it is the front one, or the back one), as so: AVCaptureDevicePosition position =...

Preventing AVCaptureVideoPreviewLayer from rotating, but allow UI layer to rotate with orientation

ios,swift,avfoundation,avcapturesession,avcapturedevice
I have a two view controllers. One is the root VC and contains my UI interface such as the record button. On this view controller, I also display the view of another VC at index 0. This view contains a AVCaptureVideoPreviewLayer. I would like my video camera to mimic the...

How to access Mac default camera using swift xcode

xcode,osx,swift,avcapturedevice
Today i am coding for Mac first time. What I am trying to do is access the default camera and show a preview. 2nd step i will record or take a snap if i need. For the 1st step i have written the following code import Cocoa import AVFoundation class...

Front Flash Brightness iPhone

ios,iphone,image,avcapturesession,avcapturedevice
I have been working on a project for a while now and I have come to one thing I want to really work out that I haven't been able to figure out. In the application when taking a front facing picture, I would like front flash to actually make the...

Objective-C AVCaptureDevice Front Camera

ios,objective-c,camera,avcapturedevice,avcapture
I have followed a tutorial that guided through a way to make a custom but simple camera app, almost exactly to the needs of the use I would like it. I actually have two issues that I need changing but I will focus on this first one for now. The...