AudioDeviceController
AudioDeviceController
AudioDeviceController
AudioDeviceController
Class
Definition
Controls device settings on the microphone.
public : sealed class AudioDeviceController : IAudioDeviceController, IMediaDeviceControllerpublic sealed class AudioDeviceController : IAudioDeviceController, IMediaDeviceControllerPublic NotInheritable Class AudioDeviceController Implements IAudioDeviceController, IMediaDeviceController// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Remarks
To get an instance of this object, retrieve the MediaCapture.AudioDeviceController property.
Note
: This class is not agile, which means that you need to consider its threading model and marshaling behavior. For more info, see Threading and Marshaling (C++/CX) and Using Windows Runtime objects in a multithreaded environment (.NET).
Properties
Muted Muted Muted Muted
Mutes or unmutes the microphone.
public : PlatForm::Boolean Muted { get; set; }public bool Muted { get; set; }Public ReadWrite Property Muted As bool// You can use this property in JavaScript.
- Value
- PlatForm::Boolean bool bool bool
True if the microphone is muted; false otherwise.
VolumePercent VolumePercent VolumePercent VolumePercent
Gets or sets the volume of the microphone.
public : float VolumePercent { get; set; }public float VolumePercent { get; set; }Public ReadWrite Property VolumePercent As float// You can use this property in JavaScript.
- Value
- float float float float
The volume of the microphone. The value ranges from 0.0 (silent) to 100.0 (full volume).
Methods
GetAvailableMediaStreamProperties(MediaStreamType) GetAvailableMediaStreamProperties(MediaStreamType) GetAvailableMediaStreamProperties(MediaStreamType) GetAvailableMediaStreamProperties(MediaStreamType)
Gets a list of the supported encoding properties for the device.
public : IVectorView<IMediaEncodingProperties> GetAvailableMediaStreamProperties(MediaStreamType mediaStreamType)public IReadOnlyList<IMediaEncodingProperties> GetAvailableMediaStreamProperties(MediaStreamType mediaStreamType)Public Function GetAvailableMediaStreamProperties(mediaStreamType As MediaStreamType) As IReadOnlyList( Of IMediaEncodingProperties )// You can use this method in JavaScript.
- mediaStreamType
- MediaStreamType MediaStreamType MediaStreamType MediaStreamType
The type of media stream for which to get the properties.
A list of the supported encoding properties.
GetMediaStreamProperties(MediaStreamType) GetMediaStreamProperties(MediaStreamType) GetMediaStreamProperties(MediaStreamType) GetMediaStreamProperties(MediaStreamType)
Gets the encoding properties for the specified media stream type for the device.
public : IMediaEncodingProperties GetMediaStreamProperties(MediaStreamType mediaStreamType)public IMediaEncodingProperties GetMediaStreamProperties(MediaStreamType mediaStreamType)Public Function GetMediaStreamProperties(mediaStreamType As MediaStreamType) As IMediaEncodingProperties// You can use this method in JavaScript.
- mediaStreamType
- MediaStreamType MediaStreamType MediaStreamType MediaStreamType
The type of media stream for which to get the properties.
The encoding properties.
SetMediaStreamPropertiesAsync(MediaStreamType, IMediaEncodingProperties) SetMediaStreamPropertiesAsync(MediaStreamType, IMediaEncodingProperties) SetMediaStreamPropertiesAsync(MediaStreamType, IMediaEncodingProperties) SetMediaStreamPropertiesAsync(MediaStreamType, IMediaEncodingProperties)
Sets the encoding properties asynchronously for the specified media stream type for the device.
public : IAsyncAction SetMediaStreamPropertiesAsync(MediaStreamType mediaStreamType, IMediaEncodingProperties mediaEncodingProperties)public IAsyncAction SetMediaStreamPropertiesAsync(MediaStreamType mediaStreamType, IMediaEncodingProperties mediaEncodingProperties)Public Function SetMediaStreamPropertiesAsync(mediaStreamType As MediaStreamType, mediaEncodingProperties As IMediaEncodingProperties) As IAsyncAction// You can use this method in JavaScript.
- mediaStreamType
- MediaStreamType MediaStreamType MediaStreamType MediaStreamType
The type of media stream for which to set the properties.
- mediaEncodingProperties
- IMediaEncodingProperties IMediaEncodingProperties IMediaEncodingProperties IMediaEncodingProperties
The encoding properties to set.
An IAsyncAction object that is used to control the asynchronous operation.