diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4dd158ba..eed88475 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -98,7 +98,7 @@ jobs: - macos_arm64 - ios name: Build sora-cpp-sdk for ${{ matrix.name }} - runs-on: macos-14 + runs-on: macos-12 steps: - uses: actions/checkout@v4 - name: Env to output diff --git a/src/mac/mac_capturer.mm b/src/mac/mac_capturer.mm index 057936cf..475ff9c3 100644 --- a/src/mac/mac_capturer.mm +++ b/src/mac/mac_capturer.mm @@ -94,11 +94,13 @@ - (void)capturer:(RTCVideoCapturer*)capturer NSArray* captureDevices() { // macOS では USB で接続されたカメラも取得する #if defined(SORA_CPP_SDK_MACOS) - AVCaptureDeviceDiscoverySession *session = [AVCaptureDeviceDiscoverySession - discoverySessionWithDeviceTypes:@[ AVCaptureDeviceTypeBuiltInWideAngleCamera, AVCaptureDeviceTypeExternal ] - mediaType:AVMediaTypeVideo - position:AVCaptureDevicePositionUnspecified]; - return session.devices; + // AVCaptureDeviceTypeExternal の利用には macOS 14 以上が必要だが、 GitHub Actions では macOS 14 が利用出来ないため一時的に古い API を使う + // AVCaptureDeviceDiscoverySession *session = [AVCaptureDeviceDiscoverySession + // discoverySessionWithDeviceTypes:@[ AVCaptureDeviceTypeBuiltInWideAngleCamera, AVCaptureDeviceTypeExternal ] + // mediaType:AVMediaTypeVideo + // position:AVCaptureDevicePositionUnspecified]; + // return session.devices; + return [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo]; #else return [RTCCameraVideoCapturer captureDevices]; # endif