MixedReality-WebRTC MixedReality-WebRTC
Search Results for

    Show / Hide Table of Contents

    Class AudioReceiver

    Endpoint for a WebRTC remote audio track.

    Inheritance
    Object
    MediaReceiver
    AudioReceiver
    Inherited Members
    MediaReceiver.IsLive
    MediaReceiver.Transceiver
    MediaReceiver.MediaLine
    MediaReceiver.OnAddedToMediaLine(MediaLine)
    MediaReceiver.OnRemovedFromMediaLine(MediaLine)
    MediaReceiver.OnDestroy()
    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:

    • The Track property is a valid remote audio track.
    • The IsLive property is 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
      MediaReceiver.MediaKind

      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
      MediaReceiver.Track
      Remarks

      This is always a or 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
      MediaReceiver.OnPaired(MediaTrack)
      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
      MediaReceiver.OnUnpaired(MediaTrack)
      Remarks

      This will be called on the Unity update thread.

      In This Article
      Back to top Generated by DocFX