Class AudioReceiver
Endpoint for a WebRTC remote audio track.
Inherited Members
Namespace: Microsoft.MixedReality.WebRTC.Unity
Assembly: cs.temp.dll.dll
Syntax
public class AudioReceiver : MediaReceiver
Remarks
Setting this on an audio MediaLine will enable the corresponding transceiver to receive. A remote track will be exposed through AudioTrack once a connection is established. The audio track can optionally be played locally with an AudioRenderer.
Fields
AudioStreamStarted
Event raised when the audio stream started.
When this event is raised, the followings are true:
Declaration
public AudioStreamStartedEvent AudioStreamStarted
Field Value
Type | Description |
---|---|
AudioStreamStartedEvent |
Remarks
This event is raised from the main Unity thread to allow Unity object access.
AudioStreamStopped
Event raised when the audio stream stopped.
When this event is raised, the followings are true:
- The IsLive property is
false
.
Declaration
public AudioStreamStoppedEvent AudioStreamStopped
Field Value
Type | Description |
---|---|
AudioStreamStoppedEvent |
Remarks
This event is raised from the main Unity thread to allow Unity object access.
Properties
AudioTrack
Remote audio track receiving data from the remote peer.
Declaration
public RemoteAudioTrack AudioTrack { get; }
Property Value
Type | Description |
---|---|
RemoteAudioTrack |
Remarks
This is null
until:
MediaKind
Media kind of the receiver.
Declaration
public override MediaKind MediaKind { get; }
Property Value
Type | Description |
---|---|
MediaKind |
Overrides
Track
Remote track associated with this receiver.
null
if this object is not receiving at this time.
Declaration
public override MediaTrack Track { get; }
Property Value
Type | Description |
---|---|
MediaTrack |
Overrides
Remarks
This is always a
Methods
OnPaired(MediaTrack)
Internal callback invoked when the receiver is paired with a media track.
Declaration
protected override void OnPaired(MediaTrack track)
Parameters
Type | Name | Description |
---|---|---|
MediaTrack | track | The media track this receiver is paired with. |
Overrides
Remarks
This will be called on the Unity update thread.
OnUnpaired(MediaTrack)
Internal callback invoked when the receiver is unpaired from a media track.
Declaration
protected override void OnUnpaired(MediaTrack track)
Parameters
Type | Name | Description |
---|---|---|
MediaTrack | track | The media track this receiver was paired with. |
Overrides
Remarks
This will be called on the Unity update thread.