-api-id | -api-type |
---|---|
P:Windows.Media.Capture.MediaCaptureInitializationSettings.SharingMode |
winrt property |
Gets or sets an object that specifies the sharing mode for the MediaCapture.
An object that specifies the sharing mode for the MediaCapture.
Multiple apps can simultaneously acquire frames from the same MediaFrameSource, but only a single app can acquire exclusive control of and modify the settings for the frame source. Set SharingMode to ExclusiveControl if you need to adjust the configuration of any of the frame sources included the requested SourceGroup. However, this means that the call to InitializeAsync will fail if another app already has exclusive control of one of the frame sources in the group. If you only need to acquire frames without modifying the configuration, set SharingMode to SharedReadOnly.
When the SharingMode is set to SharedReadOnly, some of the MediaCaptureInitializationSettings properties can't be configured. See below table for details.
Properties | Can be configured in Sharing Mode |
---|---|
AlwaysPlaySystemShutterSound | Yes |
AudioDeviceId | Yes |
AudioProcessing | Yes |
AudioSource | N/A |
DeviceUri | Yes |
DeviceUriPasswordCredential | Yes |
MediaCategory | Yes |
MemoryPreference | Yes |
PhotoCaptureSource | N/A |
PhotoMediaDescription | No |
PreviewMediaDescription | No |
RecordMediaDescription | No |
SourceGroup | Yes |
StreamingCaptureMode | Yes |
VideoDeviceId | Yes |
VideoProfile | No |
VideoSource | Yes |
backgroundMediaRecording