You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
privateasyncvoidCameraPicker_OnSelectedIndexChanged(object?sender,EventArgse){if(CameraPicker.SelectedIndex==-1)return;//Stop the camera previewMyCamera.StopCameraPreview();//Get the name of the selected camera from the pickervarselectedCameraName=CameraNames[CameraPicker.SelectedIndex];//Find the Camera Name from the list of available cameras and set it as the selected cameravarselectedCamera=(awaitMyCamera.GetAvailableCameras(CancellationToken.None)).First(camera =>camera.Name==selectedCameraName);MyCamera.SelectedCamera=selectedCamera;//Restart the camera previewawaitMyCamera.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:
Lights on the webcam indicate it is in use (StartCameraPreview())
When callingCaptureImage() with the Elgato Facecam selected, the captured Image is correct and accurate.
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
Open and Run Solution (MauiCameraTest) on Windows
Select Refresh Cameras
Select your Elgato Facecam from the Picker to observe Preview will remain black
Select Capture and observe the captured image is correct
Is there an existing issue for this?
Did you read the "Reporting a bug" section on Contributing file?
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 theCameraInfo?
object of the sameName
.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:
StartCameraPreview()
)CaptureImage()
with the Elgato Facecam selected, the captured Image is correct and accurate.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 cameraIsAvailable
, notIsCameraBusy
.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
, whileCaptureImage
still works properly.Steps To Reproduce
MauiCameraTest
) on WindowsRefresh Cameras
Capture
and observe the captured image is correctLink to public reproduction project repository
https://github.com/enusbaum/MauiCameraTest
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: