Class SetPlayoutDeviceRequest
Set the playout device (speaker/headphones).
Call this before connecting to select which speaker to use for audio output. 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 audio routing at the system level.
This will succeed but has no effect. For audio routing on mobile:
- iOS: Use AVAudioSession to control speaker/earpiece/Bluetooth routing
- Android: Use AudioManager.setSpeakerphoneOn() to switch outputs
public sealed class SetPlayoutDeviceRequest : Google.Protobuf.IMessage<SetPlayoutDeviceRequest>, Google.Protobuf.IBufferMessage
- Inheritance
-
SetPlayoutDeviceRequest
- Implements
-
IBufferMessage
- Extension Methods
Constructors
SetPlayoutDeviceRequest()
public SetPlayoutDeviceRequest()
SetPlayoutDeviceRequest(SetPlayoutDeviceRequest)
public SetPlayoutDeviceRequest(SetPlayoutDeviceRequest other)
Parameters
otherSetPlayoutDeviceRequest
Fields
DeviceIdFieldNumber
Field number for the "device_id" field.
public const int DeviceIdFieldNumber = 2
Field Value
PlatformAudioHandleFieldNumber
Field number for the "platform_audio_handle" field.
public const int PlatformAudioHandleFieldNumber = 1
Field Value
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
HasDeviceId
Gets whether the "device_id" field is set
public bool HasDeviceId { get; }
Property Value
HasPlatformAudioHandle
Gets whether the "platform_audio_handle" field is set
public bool HasPlatformAudioHandle { get; }
Property Value
Parser
public static Google.Protobuf.MessageParser<SetPlayoutDeviceRequest> Parser { get; }
Property Value
- MessageParser<SetPlayoutDeviceRequest>
PlatformAudioHandle
The PlatformAudio handle.
public ulong PlatformAudioHandle { get; set; }
Property Value
Methods
CalculateSize()
public int CalculateSize()
Returns
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 SetPlayoutDeviceRequest Clone()
Returns
Equals(SetPlayoutDeviceRequest)
public bool Equals(SetPlayoutDeviceRequest other)
Parameters
otherSetPlayoutDeviceRequest
Returns
Equals(object)
public override bool Equals(object other)
Parameters
otherobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
MergeFrom(CodedInputStream)
public void MergeFrom(Google.Protobuf.CodedInputStream input)
Parameters
inputCodedInputStream
MergeFrom(SetPlayoutDeviceRequest)
public void MergeFrom(SetPlayoutDeviceRequest other)
Parameters
otherSetPlayoutDeviceRequest
ToString()
public override string ToString()
Returns
WriteTo(CodedOutputStream)
public void WriteTo(Google.Protobuf.CodedOutputStream output)
Parameters
outputCodedOutputStream