File tree Expand file tree Collapse file tree
dConnectDevicePlugin/dConnectDeviceHost/dConnectDeviceHost/Classes/profile/DPHostMediaStreamRecording
dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -482,6 +482,9 @@ - (instancetype)init
482482 [recorder.session startRunning ];
483483 }
484484
485+ // ライトが点いていたら消灯する。
486+ [weakSelf setLightOff ];
487+
485488 // 写真を撮影する。
486489 __block AVCaptureDevice *captureDevice = [AVCaptureDevice deviceWithUniqueID: recorder.videoDevice.uniqueId];
487490 NSError *error;
@@ -698,6 +701,9 @@ - (instancetype)init
698701 return ;
699702 }
700703
704+ // ライトが点いていたら消灯する。
705+ [weakSelf setLightOff ];
706+
701707 recorder.videoOrientation = [recorder.videoConnection videoOrientation ];
702708
703709 AVCaptureDevice *captureDevice = [AVCaptureDevice deviceWithUniqueID: recorder.videoDevice.uniqueId];
@@ -2062,4 +2068,14 @@ - (void)deviceOrientationDidChange
20622068 }
20632069}
20642070
2071+ - (void )setLightOff
2072+ {
2073+ AVCaptureDevice *captureDevice = [AVCaptureDevice defaultDeviceWithMediaType: AVMediaTypeVideo];
2074+ [captureDevice lockForConfiguration: NULL ];
2075+ if (captureDevice.torchMode == AVCaptureTorchModeOn) {
2076+ captureDevice.torchMode = AVCaptureTorchModeOff;
2077+ }
2078+ [captureDevice unlockForConfiguration ];
2079+ }
2080+
20652081@end
Original file line number Diff line number Diff line change 5959 <string >アプリ使用時のみ位置情報を使用します。 </string >
6060 <key >NSMicrophoneUsageDescription </key >
6161 <string >電話をかけることができます。 </string >
62+ <key >NSPhotoLibraryAddUsageDescription </key >
63+ <string >撮影した写真を保存します。 </string >
6264 <key >NSPhotoLibraryUsageDescription </key >
6365 <string >写真を参照することができます。 </string >
6466 <key >UILaunchStoryboardName </key >
You can’t perform that action at this time.
0 commit comments