Class 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 Peer
Namespace: Microsoft.MixedReality.WebRTC.Unity
Assembly: cs.temp.dll.dll
Syntax
public abstract class Signaler : MonoBehaviour
Fields
_mainThreadWorkQueue
Task queue used to defer actions to the main Unity app thread, which is the only thread with access to Unity objects.
Declaration
protected ConcurrentQueue<Action> _mainThreadWorkQueue
Field Value
Type | Description |
---|---|
Concurrent |
_nativePeer
Native Peer
Declaration
protected PeerConnection _nativePeer
Field Value
Type | Description |
---|---|
Peer |
PeerConnection
The Peer
Declaration
public PeerConnection PeerConnection
Field Value
Type | Description |
---|---|
Peer |
Methods
OnDisable()
Declaration
protected virtual void OnDisable()
OnEnable()
Declaration
protected virtual void OnEnable()
OnIceCandidateReadyToSend(IceCandidate)
Callback invoked when an ICE candidate message has been generated and is ready to be sent to the remote peer by the signaling object.
Declaration
protected virtual void OnIceCandidateReadyToSend(IceCandidate candidate)
Parameters
Type | Name | Description |
---|---|---|
Ice |
candidate | ICE candidate to send to the remote peer. |
OnPeerInitialized()
Callback fired from the Peer
Declaration
public void OnPeerInitialized()
OnPeerUninitializing()
Callback fired from the Peer
Declaration
public void OnPeerUninitializing()
OnSdpAnswerReadyToSend(SdpMessage)
Callback invoked when a local SDP answer has been generated and is ready to be sent to the remote peer by the signaling object.
Declaration
protected virtual void OnSdpAnswerReadyToSend(SdpMessage answer)
Parameters
Type | Name | Description |
---|---|---|
Sdp |
answer | The SDP answer message to send. |
OnSdpOfferReadyToSend(SdpMessage)
Callback invoked when a local SDP offer has been generated and is ready to be sent to the remote peer by the signaling object.
Declaration
protected virtual void OnSdpOfferReadyToSend(SdpMessage offer)
Parameters
Type | Name | Description |
---|---|---|
Sdp |
offer | The SDP offer message to send. |
SendMessageAsync(IceCandidate)
Asynchronously send an ICE candidate to the remote peer.
Declaration
public abstract Task SendMessageAsync(IceCandidate candidate)
Parameters
Type | Name | Description |
---|---|---|
Ice |
candidate | The ICE candidate to send to the remote peer. |
Returns
Type | Description |
---|---|
Task | A |
SendMessageAsync(SdpMessage)
Asynchronously send an SDP message to the remote peer.
Declaration
public abstract Task SendMessageAsync(SdpMessage message)
Parameters
Type | Name | Description |
---|---|---|
Sdp |
message | The SDP message to send to the remote peer. |
Returns
Type | Description |
---|---|
Task | A |
Update()
Unity Engine Update() hook
Declaration
protected virtual void Update()