Class LocalAudioSource
This component represents a local audio source added as an audio track to an existing WebRTC peer connection and sent to the remote peer. The audio track can optionally be rendered locally with a MediaPlayer.
Namespace: Microsoft.MixedReality.WebRTC.Unity
Assembly: cs.temp.dll.dll
Syntax
public class LocalAudioSource : AudioSource
Fields
AutoAddTrack
Automatically register as an audio track when the peer connection is ready.
Declaration
public bool AutoAddTrack
Field Value
Type | Description |
---|---|
Boolean |
AutoStartCapture
Automatically start local audio capture when this component is enabled.
Declaration
public bool AutoStartCapture
Field Value
Type | Description |
---|---|
Boolean |
PeerConnection
Peer connection this local audio source will add an audio track to.
Declaration
public PeerConnection PeerConnection
Field Value
Type | Description |
---|---|
PeerConnection |
PreferredAudioCodec
Name of the preferred audio codec, or empty to let WebRTC decide. See https://en.wikipedia.org/wiki/RTP_audio_video_profile for the standard SDP names.
Declaration
public string PreferredAudioCodec
Field Value
Type | Description |
---|---|
String |
Methods
Awake()
Declaration
protected void Awake()
OnDestroy()
Declaration
protected void OnDestroy()
OnDisable()
Declaration
protected void OnDisable()
OnEnable()
Declaration
protected void OnEnable()