Table of Contents

Class SetRecordingDeviceRequest

Namespace
LiveKit.Proto

Set the recording device (microphone).

Call this before creating audio tracks to select which microphone to use. Use the GUID from AudioDeviceInfo for stable device selection across hot-plug events.

Platform Notes

  • Desktop: Works as expected - selects from enumerated devices.
  • Mobile (iOS/Android): No-op. Mobile platforms handle microphone selection at the system level. This will succeed but has no effect. Skip calling on mobile.
public sealed class SetRecordingDeviceRequest : Google.Protobuf.IMessage<SetRecordingDeviceRequest>, Google.Protobuf.IBufferMessage
Inheritance
SetRecordingDeviceRequest
Implements
IBufferMessage
Extension Methods

Constructors

SetRecordingDeviceRequest()

public SetRecordingDeviceRequest()

SetRecordingDeviceRequest(SetRecordingDeviceRequest)

public SetRecordingDeviceRequest(SetRecordingDeviceRequest other)

Parameters

other SetRecordingDeviceRequest

Fields

DeviceIdFieldNumber

Field number for the "device_id" field.

public const int DeviceIdFieldNumber = 2

Field Value

int

PlatformAudioHandleFieldNumber

Field number for the "platform_audio_handle" field.

public const int PlatformAudioHandleFieldNumber = 1

Field Value

int

Properties

Descriptor

public static Google.Protobuf.Reflection.MessageDescriptor Descriptor { get; }

Property Value

MessageDescriptor

DeviceId

Device GUID from AudioDeviceInfo.guid - stable across device additions/removals.

public string DeviceId { get; set; }

Property Value

string

HasDeviceId

Gets whether the "device_id" field is set

public bool HasDeviceId { get; }

Property Value

bool

HasPlatformAudioHandle

Gets whether the "platform_audio_handle" field is set

public bool HasPlatformAudioHandle { get; }

Property Value

bool

Parser

public static Google.Protobuf.MessageParser<SetRecordingDeviceRequest> Parser { get; }

Property Value

MessageParser<SetRecordingDeviceRequest>

PlatformAudioHandle

The PlatformAudio handle.

public ulong PlatformAudioHandle { get; set; }

Property Value

ulong

Methods

CalculateSize()

public int CalculateSize()

Returns

int

ClearDeviceId()

Clears the value of the "device_id" field

public void ClearDeviceId()

ClearPlatformAudioHandle()

Clears the value of the "platform_audio_handle" field

public void ClearPlatformAudioHandle()

Clone()

public SetRecordingDeviceRequest Clone()

Returns

SetRecordingDeviceRequest

Equals(SetRecordingDeviceRequest)

public bool Equals(SetRecordingDeviceRequest other)

Parameters

other SetRecordingDeviceRequest

Returns

bool

Equals(object)

public override bool Equals(object other)

Parameters

other object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

MergeFrom(CodedInputStream)

public void MergeFrom(Google.Protobuf.CodedInputStream input)

Parameters

input CodedInputStream

MergeFrom(SetRecordingDeviceRequest)

public void MergeFrom(SetRecordingDeviceRequest other)

Parameters

other SetRecordingDeviceRequest

ToString()

public override string ToString()

Returns

string

WriteTo(CodedOutputStream)

public void WriteTo(Google.Protobuf.CodedOutputStream output)

Parameters

output CodedOutputStream