Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
257 views
in Technique[技术] by (71.8m points)

ios - Individual Access of Camera LED Lights of iPhone 5s

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I opened a Technical Support Incident (TSI) with Apple Developer Support regarding the individual access of camera LED lights of the iPhone 5s.

I got a reply from them today. Here's what they said.

Hello Jim,

Thank you for contacting Apple Developer Technical Support (DTS). Our engineers have reviewed your request and have concluded that there is no supported way to achieve the desired functionality given the currently shipping system configurations.

If you would like for Apple to consider adding support to access the camera LED lights individually on the device, please submit an enhancement request via the Bug Reporter tool at http://bugreport.apple.com.

While you were initially charged a technical support incident for this support request, we have assigned a replacement incident back to your account.

Thank you for taking the time to file this report. We truly appreciate your help in discovering and isolating issues.

Apple Developer Support Worldwide Developer Relations

I did open an enhancement request via their Bug Reporter tool as they suggested. If anything comes of this, then I'll post it here. Cheers!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...