From 9850b2bb0c866d66b537a350950c1988b180b46c Mon Sep 17 00:00:00 2001 From: enm10k Date: Wed, 1 Nov 2023 12:12:27 +0900 Subject: [PATCH] =?UTF-8?q?iOS=20=E3=81=AE=20captureDevices=20=E3=82=82?= =?UTF-8?q?=E8=87=AA=E4=BD=9C=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mac/mac_capturer.mm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mac/mac_capturer.mm b/src/mac/mac_capturer.mm index 475ff9c3..90cb2d35 100644 --- a/src/mac/mac_capturer.mm +++ b/src/mac/mac_capturer.mm @@ -102,7 +102,11 @@ - (void)capturer:(RTCVideoCapturer*)capturer // return session.devices; return [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo]; #else - return [RTCCameraVideoCapturer captureDevices]; + AVCaptureDeviceDiscoverySession *session = [AVCaptureDeviceDiscoverySession + discoverySessionWithDeviceTypes:@[ AVCaptureDeviceTypeBuiltInWideAngleCamera ] + mediaType:AVMediaTypeVideo + position:AVCaptureDevicePositionUnspecified]; + return session.devices; # endif }