CommunityToolkit / CommunityToolkit/Maui
[BUG] CameraView doesn't restart preview with Elgato Facecam
- Dominant language
- C#
- Stars
- 2.7k
- Forks
- 500
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 7
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Did you read the "Reporting a bug" section on Contributing file?
- [x] I have read the "Reporting a bug" section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug
### Current Behavior
I've started working with `CommunityToolkit.Maui.Camera` on my Windows laptop connected to a USB dock for my external devices. When docked, I use an **Elgato Facecam** (The fist revision, not the newer "Mk. 2") which is USB 1080p60 fixed focal webcam.
My current Maui app is just a simple single page application that has a Picker that enumerates the Available Cameras (as the default is always my laptops integrated webcam). When selecting a new camera from the list of available cameras from the picker, my code changes `.SelectedCamera` to the `CameraInfo?` object of the same `Name`.

```csharp
private async void CameraPicker_OnSelectedIndexChanged(object? sender, EventArgs e)
{
if (CameraPicker.SelectedIndex == -1)
return;
//Stop the camera preview
MyCamera.StopCameraPreview();
//Get the name of the selected camera from the picker
var selectedCameraName = CameraNames[CameraPicker.SelectedIndex];
//Find the Camera Name from the list of available cameras and set it as the selected camera
var selectedCamera = (await MyCamera.GetAvailableCameras(CancellationToken.None)).First(camera => camera.Name == selectedCameraName);
MyCamera.SelectedCamera = selectedCamera;
//Restart the camera preview
await MyCamera.StartCameraPreview(CancellationToken.None);
}
```
When selecting the **Logitech C920**, the Image Preview works as intended. When selecting the **Elgato Facecam** the image preview remains black. When switching back to the **Logitech C920** from the **Elgato Facecam** the Image Preview resumes working as intended.
I've verified the Elgato Facecam itself is initializing properly:
1. Lights on the webcam indicate it is in use (`StartCameraPreview()`)
2. When calling`CaptureImage()` with the **Elgato Facecam** selected, the captured Image is correct and accurate.
3. Using webcamtests.com from Firefox confirms the Camera operates as intended
I suspect it might be something weird with the driver, but there's no way to detect something is amiss. The `CameraView` is reporting that the camera `IsAvailable`, not `IsCameraBusy`.
### Expected Behavior
I would expect the camera preview on Windows to operate the same for any selected available camera. Currently only the **Elgato Facecam** will not display a preview in `CameraView`, while `CaptureImage` still works properly.
### Steps To Reproduce
1. Open and Run Solution (`MauiCameraTest`) on Windows
2. Select `Refresh Cameras`
3. Select your **Elgato Facecam** from the Picker to observe Preview will remain black
4. Select `Capture` and observe the captured image is correct
5. Select another webcam from the Picker
6. Observe Preview resumes working as intended
### Link to public reproduction project repository
https://github.com/enusbaum/MauiCameraTest
### Environment
```markdown
- .NET MAUI CommunityToolkit.Maui.Camera: 2.0.0
- OS: Windows 11 24H2 (Build 26100.2605)
- .NET MAUI: 9.0.21
```
### Anything else?
_No response_
Contributor guide
Research direction
Start by running the MauiCameraTest reproduction on Windows with an Elgato Facecam and a Logitech C920. Inspect the CameraView paths used by StopCameraPreview(), SelectedCamera, StartCameraPreview(), and CaptureImage() to compare preview and capture behavior. Done means the Elgato Facecam preview renders after switching cameras and restarting the preview.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop-dev, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100