Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macos #1337

Open
Nicholas86 opened this issue Feb 20, 2025 · 1 comment
Open

macos #1337

Nicholas86 opened this issue Feb 20, 2025 · 1 comment

Comments

@Nicholas86
Copy link

macos , start api 添加这个代码, 才可以识别外接摄像头。
// Open the camera device
if #available(macOS 10.14, *) {
device = AVCaptureDevice.devices(for: .video).first
print("--原生初始化设备10.14,device:(device)😆😆---")
} else if #available(macOS 10.15, *) {
device = AVCaptureDevice.DiscoverySession(deviceTypes: [.builtInWideAngleCamera],
mediaType: .video,
position: .unspecified).devices.first
// print("--😆😆原生初始化设备10.15, device:(device)😆😆---")
} else {
device = AVCaptureDevice.devices(for: .video).first
// print("--😆😆原生初始化设备不是device:(device)😆😆---")
}

@navaronbracke
Copy link
Collaborator

What bug are you trying to report?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants