We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 670b630 commit 845040bCopy full SHA for 845040b
crates/camera-avfoundation/src/lib.rs
@@ -18,9 +18,14 @@ pub fn list_video_devices() -> arc::R<ns::Array<av::CaptureDevice>> {
18
];
19
20
if api::macos_available("14.0") {
21
- device_types.push(unsafe { av::CaptureDeviceType::external().unwrap() })
+ if let Some(typ) = unsafe { av::CaptureDeviceType::external() } {
22
+ device_types.push(typ);
23
+ }
24
+ if let Some(typ) = unsafe { av::CaptureDeviceType::continuity_camera() } {
25
26
27
} else {
- device_types.push(av::CaptureDeviceType::external_unknown())
28
+ device_types.push(av::CaptureDeviceType::external_unknown());
29
}
30
31
let device_types = ns::Array::from_slice(&device_types);
0 commit comments