dotnet / dotnet/maui

MediaPicker default camera for capture

Open
#29,082 1 comment 7 reactions 0 assignees View on GitHub
area-essentials area-essentials-mediapicker s/triaged
Dominant language
C#
Stars
23.3k
Forks
2k
Avg merge
1d 15h
Merged PRs (30d)
290

Description

Allows the developer to specify which camera is used initially when capturing media. A new property `DefaultCamera` would be added to the `MediaPickerCaptureOptions` object that allows to select front or rear.

```csharp
public class MediaPickerCaptureOptions
{
///
/// Gets or sets the default camera to be used for capturing media.
/// Default value is .
///
///
/// This setting might not work on Android as it's dependant on the Android camera app that is being used and if that camera app implements a way to specify the camera to use.
/// With this property we only set the preferred camera, this is not restricting the user-interface to still switch to another camera if available.
///
public CameraDevice DefaultCamera { get; set; }
}
```

```csharp
///
/// Represents camera devices tha can be used to capture images or video for usage with .
///
public enum CameraDevice
{
/// The camera on the back of the device.
Rear,

/// The front facing camera of the device.
Front,
}
```

Contributor guide

Open the contributing guide

Research direction

Start by locating MediaPickerCaptureOptions and the MediaPicker capture entry points for each supported platform, then trace how capture options are passed to the native camera experience. Done means the preferred front or rear CameraDevice can be selected, the default remains Rear, and the documented Android limitation is preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
mobile-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.