We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents aea0825 + 9eb5a4c commit e7f9799Copy full SHA for e7f9799
1 file changed
dConnectDevicePlugin/dConnectDeviceHost/dConnectDeviceHost/Classes/DPHostService.m
@@ -57,7 +57,13 @@ - (instancetype) initWithFileManager: (DConnectFileManager *) fileMgr plugin: (i
57
[self addProfile:[DPHostCanvasProfile new]];
58
[self addProfile:[DPHostTouchProfile new]];
59
[self addProfile:[DPHostGeolocationProfile new]];
60
- [self addProfile:[DPHostLightProfile new]];
+
61
+ AVCaptureDevice *captureDevice = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];
62
+ if ([captureDevice isTorchAvailable]
63
+ && [captureDevice isTorchModeSupported:AVCaptureTorchModeOn]
64
+ && [captureDevice isTorchModeSupported:AVCaptureTorchModeOff]) {
65
+ [self addProfile:[DPHostLightProfile new]];
66
+ }
67
}
68
return self;
69
0 commit comments