I'm coding for the iPhone 5s and it now has two LED lights for the rear camera. I don't know the official LED color names, but one LED is white and the other LED is yellowish. Apple refers to this as "True Tone".
I'm trying to access these camera LED lights individually.
I believe this to be possible because when I access iOS7's control center (swipe up from bottom) and press the built-in flash light, only the white LED comes on.
This is different from applying the torch light code below. When I execute the code below, both LED lights come on.
AVCaptureDevice *device = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];
if ([device hasTorch] && [device isTorchAvailable] && [device isTorchModeSupported:AVCaptureTorchModeOn]) {
[device lockForConfiguration:nil];
[device setTorchMode: onOff ? AVCaptureTorchModeOn : AVCaptureTorchModeOff];
[device unlockForConfiguration];
}
I've been searching through the AVCaptureDevice Class reference and I have not seen anything specific about accessing the two LED lights individually. What I mean is, to turn on only the white LED or turn on only the yellowish LED. Not both LED's at the same time.
I am making one assumption that both lights are LEDs.
Any ideas on how to do this?
Many thanks for any info on this.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…