Namespace Microsoft.MixedReality.WebRTC.Unity
Classes
Android
AsyncInitHelper<T>
Utility for resources in Unity components that need asynchronous initialization, and don't match well the Unity synchronous enable/disable workflow.
AudioReceiver
Endpoint for a WebRTC remote audio track.
AudioRenderer
Utility component used to play audio frames obtained from a WebRTC audio source.
AudioStreamStartedEvent
Unity event corresponding to a new audio stream being started.
AudioStreamStoppedEvent
Unity event corresponding to an on-going audio stream being stopped.
AudioTrackSource
This component represents an audio track source generating audio frames for one or more audio tracks.
CaptureCameraAttribute
Attribute for a
CustomVideoSource<T>
Abstract base component for a custom video source delivering raw video frames directly to the WebRTC implementation.
InvalidTransceiverMediaKindException
Exception thrown when an invalid transceiver media kind was detected, generally when trying to pair a transceiver of one media kind with a media line of a different media kind.
LocalOnlySignaler
Simple signaler using two peer connections in the same process, and hard-coding their SDP message delivery to avoid the need for any kind of networking to deliver SDP messages.
This component is designed to be used in demos where both peers are present in the same scene.
MediaLine
Media line abstraction for a peer connection.
This container binds together a source component (MediaTrackSource) and/or a receiver component (MediaReceiver) on one side, with a transceiver on the other side. The media line is a declarative representation of this association, which is then turned into a binding by the implementation during an SDP negotiation. This forms the core of the algorithm allowing automatic transceiver pairing between the two peers based on the declaration of intent of the user.
Assigning Unity components to the Source and Receiver properties serves
as an indication of the user intent to send and/or receive media through the transceiver, and is
used during the SDP exchange to derive the
Users typically interact with this class through the peer connection transceiver collection in the Unity inspector window, though direct manipulation via code is also possible.
MediaReceiver
Base class for media producers generating frames by receiving them from a remote peer.
MediaTrackSource
Base class for media track source components producing some media frames locally.
MicrophoneSource
This component represents a local audio source generating audio frames from a local audio capture device (microphone). The audio source can be used to create one or more audio tracks sharing the same audio content.
NativeVideoRenderer
This will render the video stream through native calls with DX11 or OpenGL, completely bypassing C# marshalling. This provides a considerable performance improvement compared to VideoRenderer.
NodeDssSignaler
Simple signaler for debug and testing. This is based on https://github.com/bengreenier/node-dss and SHOULD NOT BE USED FOR PRODUCTION.
PeerConnection
High-level wrapper for Unity WebRTC functionalities. This is the API entry point for establishing a connection with a remote peer.
SceneVideoSource
Custom video source capturing the Unity scene content as rendered by a given camera, and sending it as a video track through the selected peer connection.
SdpTokenAttribute
Attribute for string properties representing an SDP token, which has constraints on the allowed characters it can contain, as defined in the SDP RFC.
See https://tools.ietf.org/html/rfc4566#page-43 for details.
Signaler
Abstract base class to simplify implementing a WebRTC signaling solution in Unity.
There is no requirement to use this class as a base class for a custom implementation, but it handles automatically registering the necessary PeerConnection event handlers, as well as dispatching free-threaded callbacks to the main Unity app thread for simplicity and safety, and leaves the implementation with instead with two sending methods SendMessageAsync(SdpMessage) and SendMessageAsync(IceCandidate) to implement, as well as handling received messages.
TextureDesc
UniformColorVideoSource
A video source producing some colored frames generated programmatically.
VideoReceiver
Endpoint for a WebRTC remote video track.
VideoRenderer
Utility component used to play video frames obtained from a WebRTC video track. This can indiscriminately play video frames from a video track source on the local peer as well as video frames from a remote video receiver obtaining its frame from a remote WebRTC peer.
VideoStreamStartedEvent
Unity event corresponding to a new video stream being started.
VideoStreamStoppedEvent
Unity event corresponding to an on-going video stream being stopped.
VideoTrackSource
This component represents a video track source, an entity which produces raw video frames for one or more tracks. The source can be added on a peer connection media line to be sent through that peer connection. It is a standalone object, independent of any peer connection, and can be shared with multiple of them.
WebcamSource
This component represents a local video sender generating video frames from a local video capture device (webcam).
WebRTCErrorEvent
A UnityEvent that represents a WebRTC error event.
WorkQueue
Base class providing some utility work queue to dispatch free-threaded actions to the main Unity application thread, where the handler(s) can safely access Unity objects.
Structs
ConfigurableIceServer
ICE server as a serializable data structure for the Unity inspector.
VideoCaptureConstraints
Additional optional constraints applied to the resolution and framerate when selecting a video capture format.
Enums
IceType
Enumeration of the different types of ICE servers.
LocalVideoSourceFormatMode
Video capture format selection mode for a local video source.