.NET SDK Documentation
Search Results for

    Show / Hide Table of Contents

    Class MediaDeviceService

    The media device service provides access to set the input and output audio devices as well as getting notifications about the added and removed devices.

    To use the media device service, follow these steps:

    1. Get all current audio devices using the GetAudioDevicesAsync() method.
    2. Set the desired input audio device by calling the SetPreferredAudioInputDeviceAsync(AudioDevice) method.
    3. Set the desired output audio device by calling the SetPreferredAudioOutputDeviceAsync(AudioDevice) method.
    4. Subscribe to the AudioDeviceAdded, AudioDeviceRemoved, and AudioDeviceChanged events.
    Inheritance
    Object
    MediaDeviceService
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: DolbyIO.Comms.Services
    Assembly: DolbyIO.Comms.Sdk.dll
    Syntax
    public sealed class MediaDeviceService

    Properties

    | Improve this Doc View Source

    AudioDeviceAdded

    Sets the AudioDeviceAddedEventHandler that is raised when a new audio device is added to the system.

    Declaration
    public AudioDeviceAddedEventHandler AudioDeviceAdded { set; }
    Property Value
    Type Description
    AudioDeviceAddedEventHandler

    The AudioDeviceAddedEventHandler event handler.

    | Improve this Doc View Source

    AudioDeviceChanged

    Sets the AudioDeviceChangedEventHandler that is raised when the currently used input or output audio device has changed.

    Declaration
    public AudioDeviceChangedEventHandler AudioDeviceChanged { set; }
    Property Value
    Type Description
    AudioDeviceChangedEventHandler

    The AudioDeviceChangedEventHandler event handler.

    | Improve this Doc View Source

    AudioDeviceRemoved

    Sets the AudioDeviceRemovedEventHandler that is raised when an audio device is removed from the system.

    Declaration
    public AudioDeviceRemovedEventHandler AudioDeviceRemoved { set; }
    Property Value
    Type Description
    AudioDeviceRemovedEventHandler

    The AudioDeviceRemovedEventHandler event handler.

    | Improve this Doc View Source

    VideoDeviceAdded

    Sets the VideoDeviceAddedEventHandler that is raised when a new video device is added to the system.

    Declaration
    public VideoDeviceAddedEventHandler VideoDeviceAdded { set; }
    Property Value
    Type Description
    VideoDeviceAddedEventHandler

    The AudioDeviceAddedEventHandler event handler.

    | Improve this Doc View Source

    VideoDeviceChanged

    Sets the VideoDeviceChangedEventHandler that is raised when the currently used input or output video device has changed.

    Declaration
    public VideoDeviceChangedEventHandler VideoDeviceChanged { set; }
    Property Value
    Type Description
    VideoDeviceChangedEventHandler

    The VideoDeviceChangedEventHandler event handler.

    | Improve this Doc View Source

    VideoDeviceRemoved

    Sets the VideoDeviceRemovedEventHandler that is raised when a video device is removed from the system.

    Declaration
    public VideoDeviceRemovedEventHandler VideoDeviceRemoved { set; }
    Property Value
    Type Description
    VideoDeviceRemovedEventHandler

    The VideoDeviceRemovedEventHandler event handler.

    Methods

    | Improve this Doc View Source

    GetAudioDevicesAsync()

    Gets a list of all audio devices that are currently available in the system.

    Declaration
    public async Task<List<AudioDevice>> GetAudioDevicesAsync()
    Returns
    Type Description
    Task<List<AudioDevice>>

    The Task<TResult> that represents the asynchronous operation. The Result property returns a list of audio devices that are currently available in the system.

    | Improve this Doc View Source

    GetCurrentAudioInputDeviceAsync()

    Gets the audio input device that is currently used by the system.

    Declaration
    public async Task<AudioDevice> GetCurrentAudioInputDeviceAsync()
    Returns
    Type Description
    Task<AudioDevice>

    The Task<TResult> that represents the asynchronous operation. The Result property returns the audio device that is currently used by the system.

    | Improve this Doc View Source

    GetCurrentAudioOutputDeviceAsync()

    Gets the audio output device that is currently used by the system.

    Declaration
    public async Task<AudioDevice> GetCurrentAudioOutputDeviceAsync()
    Returns
    Type Description
    Task<AudioDevice>

    The currently used output audio device.

    | Improve this Doc View Source

    GetCurrentVideoDeviceAsync()

    Gets the video device that is currently used by the system.

    Declaration
    public async Task<VideoDevice> GetCurrentVideoDeviceAsync()
    Returns
    Type Description
    Task<VideoDevice>

    The Result property returns the video device that is currently used by the system.

    | Improve this Doc View Source

    GetVideoDevicesAsync()

    Gets a list of all video devices that are currently available in the system.

    Declaration
    public async Task<List<VideoDevice>> GetVideoDevicesAsync()
    Returns
    Type Description
    Task<List<VideoDevice>>

    The Task<TResult> that represents an asynchronous operation. The Result property returns a list of video devices that are currently available in the system.

    | Improve this Doc View Source

    SetPreferredAudioInputDeviceAsync(AudioDevice)

    Sets the preferred input audio device.

    Declaration
    public async Task SetPreferredAudioInputDeviceAsync(AudioDevice device)
    Parameters
    Type Name Description
    AudioDevice device

    The AudioDevice object to set as preferred input device.

    Returns
    Type Description
    Task

    A Task that represents the asynchronous operation.

    | Improve this Doc View Source

    SetPreferredAudioOutputDeviceAsync(AudioDevice)

    Sets the preferred output audio device.

    Declaration
    public async Task SetPreferredAudioOutputDeviceAsync(AudioDevice device)
    Parameters
    Type Name Description
    AudioDevice device

    The AudioDevice object to set as preferred output device.

    Returns
    Type Description
    Task

    A Task that represents the asynchronous operation.

    • Improve this Doc
    • View Source
    ☀
    ☾
    In This Article
    Back to top
    Generated by DocFX
    ☀
    ☾