File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ class RNInCallManager: NSObject, AVAudioPlayerDelegate {
5656 var cameraPermission : String !
5757 var media : String = " audio "
5858
59- private lazy var device : AVCaptureDevice ? = { AVCaptureDevice . defaultDeviceWithMediaType ( AVMediaTypeVideo) } ( )
59+ private lazy var device : AVCaptureDevice ? = { AVCaptureDevice . defaultDevice ( withMediaType : AVMediaTypeVideo) } ( )
6060
6161 // --- AVAudioSessionCategoryOptionAllowBluetooth:
6262 // --- Valid only if the audio session category is AVAudioSessionCategoryPlayAndRecord or AVAudioSessionCategoryRecord.
@@ -254,13 +254,13 @@ class RNInCallManager: NSObject, AVAudioPlayerDelegate {
254254
255255 @objc func setFlashOn( enable: Bool , brightness: NSNumber ) -> Void {
256256 guard let device = device else { return }
257- if device. hasTorch && device. position == AVCaptureDevicePosition . Back {
257+ if device. hasTorch && device. position == . back {
258258 do {
259259 try device. lockForConfiguration ( )
260260 if enable {
261261 try device. setTorchModeOnWithLevel ( brightness. floatValue)
262262 } else {
263- device. torchMode = . Off
263+ device. torchMode = . off
264264 }
265265 NSLog ( " RNInCallManager.setForceSpeakerphoneOn(): enable: \( enable) " )
266266 device. unlockForConfiguration ( )
You can’t perform that action at this time.
0 commit comments