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
Currently using Community Toolkit Camera to develop a camera app. When I Stop Preview camera, it work properly. The issue was when I tried to use the StartCameraPreviewCommand, it didn't restart the camera preview at all. There are no exception occur or any errors captured.
Please refer to the screen recorder below and attached Debug log from VS2022.
I solved it by using StartCameraPreview and StopCameraPreview method in code instead of binding command directly in XAML.
Not worked (not able to start camera preview after stop camera preview):
<Button Command="{Binding StartCameraPreviewCommand, Source={x:Reference Camera}, x:DataType=toolkit:CameraView}"
Text="StartCameraPreview" />
<Button Command="{Binding StopCameraPreviewCommand, Source={x:Reference Camera}, x:DataType=toolkit:CameraView}"
Text="StopCameraPreview" />
Worked (able to start camera and stop camera preview normally):
<Button Clicked="Button_Clicked"
Text="StartCameraPreview" />
Is there an existing issue for this?
Did you read the "Reporting a bug" section on Contributing file?
Current Behavior
Hi all,
Currently using Community Toolkit Camera to develop a camera app. When I Stop Preview camera, it work properly. The issue was when I tried to use the StartCameraPreviewCommand, it didn't restart the camera preview at all. There are no exception occur or any errors captured.
Please refer to the screen recorder below and attached Debug log from VS2022.
Debug log.txt
SVID_20241220_154946_1.mp4
The code I using is from Microsoft documentation.
https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/views/camera-view?tabs=android
Any help would be appreciated.
Expected Behavior
Able to restart camera preview after stop
Steps To Reproduce
Link to public reproduction project repository
https://github.com/kwjcode/MobileApp.git
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: