Class ManagedConnection
A managed connection.
Inheritance
Implements
Inherited Members
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public abstract class ManagedConnection : Dynamic, IEquatable<NSObject>, INSObjectProtocol, INativeObject, IDisposable
Constructors
ManagedConnection(Object, String, String, String, String, String, Function1<Message, Future<Message>>, String, AudioStream, VideoStream, DataStream, String)
ManagedConnection constructor.
Declaration
protected ManagedConnection(object sharedLock, string applicationId, string channelId, string userId, string deviceId, string clientId, Function1<Message, Future<Message>> doSend, string type, AudioStream audioStream, VideoStream videoStream, DataStream dataStream, string mediaId)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sharedLock | |
System.String | applicationId | |
System.String | channelId | |
System.String | userId | |
System.String | deviceId | |
System.String | clientId | |
Function1<Message, Future<Message>> | doSend | |
System.String | type | |
AudioStream | audioStream | |
VideoStream | videoStream | |
DataStream | dataStream | |
System.String | mediaId |
ManagedConnection(Object, String, String, String, String, String, Function1<Message, Future<Message>>, String, AudioStream, VideoStream, DataStream, String, Boolean)
ManagedConnection constructor.
Declaration
protected ManagedConnection(object sharedLock, string applicationId, string channelId, string userId, string deviceId, string clientId, Function1<Message, Future<Message>> doSend, string type, AudioStream audioStream, VideoStream videoStream, DataStream dataStream, string mediaId, bool useWebSocketsForMedia)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sharedLock | |
System.String | applicationId | |
System.String | channelId | |
System.String | userId | |
System.String | deviceId | |
System.String | clientId | |
Function1<Message, Future<Message>> | doSend | |
System.String | type | |
AudioStream | audioStream | |
VideoStream | videoStream | |
DataStream | dataStream | |
System.String | mediaId | |
System.Boolean | useWebSocketsForMedia |
Properties
ApplicationId
Gets the application identifier.
Declaration
public string ApplicationId { get; }
Property Value
Type | Description |
---|---|
System.String |
AudioDirection
Gets the audio direction. Null if disabled.
Declaration
public string AudioDirection { get; }
Property Value
Type | Description |
---|---|
System.String |
AudioStream
Gets the audio stream.
Declaration
public AudioStream AudioStream { get; }
Property Value
Type | Description |
---|---|
AudioStream |
AudioUnmuteDisabled
Gets whether the ability to unmute audio is disabled.
Declaration
public bool AudioUnmuteDisabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
BundlePolicy
Gets or sets the Bundle Policy.
Declaration
public BundlePolicy BundlePolicy { get; set; }
Property Value
Type | Description |
---|---|
BundlePolicy |
CanonicalName
Gets the connection's canonical name.
Declaration
[Obsolete("Use MediaStream.LocalCanonicalName instead.")]
public string CanonicalName { get; }
Property Value
Type | Description |
---|---|
System.String |
ChannelId
Gets the channel identifier.
Declaration
public string ChannelId { get; }
Property Value
Type | Description |
---|---|
System.String |
ClientId
Gets the client identifier.
Declaration
public string ClientId { get; }
Property Value
Type | Description |
---|---|
System.String |
Config
Gets the current configuration.
Declaration
public ConnectionConfig Config { get; }
Property Value
Type | Description |
---|---|
ConnectionConfig |
CreateDatagramSocket
Gets or sets a method that creates Datagram sockets. Optional. If not set, default OS UDP socket is used.
Declaration
public Function1<DatagramSocketCreateArgs, DatagramSocket> CreateDatagramSocket { get; set; }
Property Value
Type | Description |
---|---|
Function1<DatagramSocketCreateArgs, DatagramSocket> |
CreateStreamSocket
Gets or sets a method that creates Stream sockets. Optional. If not set, default OS TCP socket is used.
Declaration
public Function1<StreamSocketCreateArgs, StreamSocket> CreateStreamSocket { get; set; }
Property Value
Type | Description |
---|---|
Function1<StreamSocketCreateArgs, StreamSocket> |
DataDirection
Gets the data direction. Null if disabled.
Declaration
public string DataDirection { get; }
Property Value
Type | Description |
---|---|
System.String |
DataStream
Gets the data stream.
Declaration
public DataStream DataStream { get; }
Property Value
Type | Description |
---|---|
DataStream |
DeadStreamTimeout
Gets or sets the amount of time (in milliseconds) to wait before declaring the connection dead. When there are no candidate pairs connected, the timer will start. When a candidate pair becomes connected the timer will be reset and stopped. If no candidate pairs become connected before the timeout is reached, the state of the connection will change to failed. Defaults to 15,000.
Declaration
public int DeadStreamTimeout { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
DefaultLocalDtlsCertificate
Gets or sets the default local DTLS certificate.
Declaration
public static DtlsCertificate DefaultLocalDtlsCertificate { get; set; }
Property Value
Type | Description |
---|---|
DtlsCertificate |
DefaultLocalDtlsCertificates
Gets or sets the default local DTLS certificates.
Declaration
public static DtlsCertificate[] DefaultLocalDtlsCertificates { get; set; }
Property Value
Type | Description |
---|---|
DtlsCertificate[] |
DefaultNoMediaServerTimeout
Gets or sets the default timeout, in milliseconds, between retries for cases
where no Media Servers are available for either ICE servers or SFU/MCU offer processing.
The default value is 120,000 (2 minutes).
Declaration
public static int DefaultNoMediaServerTimeout { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
DefaultStatsEventInterval
Gets or sets the default interval, in milliseconds, between stats events raised locally by OnStats.
The default value is 1,000 (1 second).
Declaration
public static int DefaultStatsEventInterval { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
DefaultStatsInterval
Gets or sets the default interval, in milliseconds, between stats reports sent to the Gateway.
The default value is 10,000 (10 seconds).
Declaration
[Obsolete("Use DefaultStatsReportInterval instead.")]
public static int DefaultStatsInterval { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
DefaultStatsReportInterval
Gets or sets the default interval, in milliseconds, between stats reports sent to the Gateway.
The default value is 10,000 (10 seconds).
Declaration
public static int DefaultStatsReportInterval { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
DeviceId
Gets the device identifier.
Declaration
public string DeviceId { get; }
Property Value
Type | Description |
---|---|
System.String |
DisableAutomaticIceServers
Gets or sets whether to disable automatic ICE servers (embedded TURN).
Declaration
public bool DisableAutomaticIceServers { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
DtlsCipherSuites
Gets or sets the DTLS cipher suites to use. Defaults to: DtlsCipherSuite.EcdheEcdsaAes128Sha, DtlsCipherSuite.EcdheEcdsaAes128GcmSha256, DtlsCipherSuite.EcdheEcdsaAes128CbcSha256, DtlsCipherSuite.EcdheRsaAes128Sha, DtlsCipherSuite.EcdheRsaAes128GcmSha256, DtlsCipherSuite.EcdheRsaAes128CbcSha256, DtlsCipherSuite.RsaAes128Sha, DtlsCipherSuite.RsaAes128GcmSha256, DtlsCipherSuite.RsaAes128CbcSha256,
Declaration
public DtlsCipherSuite[] DtlsCipherSuites { get; set; }
Property Value
Type | Description |
---|---|
DtlsCipherSuite[] |
DtlsClientVersion
Gets or sets the protocol version to use when in the DTLS client role. Defaults to Dtls10.
Declaration
public DtlsProtocolVersion DtlsClientVersion { get; set; }
Property Value
Type | Description |
---|---|
DtlsProtocolVersion |
DtlsServerMaxVersion
Gets or sets the maximum protocol version to allow when in the DTLS server role. Defaults to Dtls12.
Declaration
public DtlsProtocolVersion DtlsServerMaxVersion { get; set; }
Property Value
Type | Description |
---|---|
DtlsProtocolVersion |
DtlsServerMinVersion
Gets or sets the minimum protocol version to allow when in the DTLS server role. Defaults to Dtls10.
Declaration
public DtlsProtocolVersion DtlsServerMinVersion { get; set; }
Property Value
Type | Description |
---|---|
DtlsProtocolVersion |
Error
Gets the error, if an error exists.
Declaration
public Error Error { get; }
Property Value
Type | Description |
---|---|
Error |
ExternalId
Gets the external connection identifier.
Declaration
public string ExternalId { get; }
Property Value
Type | Description |
---|---|
System.String |
GatheringState
Gets the state of the ice gathering.
Declaration
public IceGatheringState GatheringState { get; }
Property Value
Type | Description |
---|---|
IceGatheringState |
HasAudio
Gets whether this connection has an audio stream.
Declaration
public bool HasAudio { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasData
Gets whether this connection has a data stream.
Declaration
public bool HasData { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasVideo
Gets whether this connection has a video stream.
Declaration
public bool HasVideo { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IceAddressTypes
Gets or sets the ICE address types.
Declaration
public AddressType[] IceAddressTypes { get; set; }
Property Value
Type | Description |
---|---|
AddressType[] |
IceConnectionState
Gets the state of the ice connection.
Declaration
public IceConnectionState IceConnectionState { get; }
Property Value
Type | Description |
---|---|
IceConnectionState |
IceGatherPolicy
Gets or sets the ICE gather policy.
Declaration
public IceGatherPolicy IceGatherPolicy { get; set; }
Property Value
Type | Description |
---|---|
IceGatherPolicy |
IcePolicy
Gets or sets policy indicating whether ICE is required (and enabled) or disabled (and not required for this connection).
Declaration
public IcePolicy IcePolicy { get; set; }
Property Value
Type | Description |
---|---|
IcePolicy |
IcePortRange
Gets or sets the ICE port range.
Declaration
public IcePortRange IcePortRange { get; set; }
Property Value
Type | Description |
---|---|
IcePortRange |
IceRole
Gets the ICE role.
Declaration
public IceRole IceRole { get; }
Property Value
Type | Description |
---|---|
IceRole |
IceServer
Gets or sets the ICE server.
Declaration
public IceServer IceServer { get; set; }
Property Value
Type | Description |
---|---|
IceServer |
IceServers
Gets or sets the ICE servers.
Declaration
public IceServer[] IceServers { get; set; }
Property Value
Type | Description |
---|---|
IceServer[] |
Id
Gets the connection identifier.
Declaration
public string Id { get; }
Property Value
Type | Description |
---|---|
System.String |
Info
Gets the connection info.
Declaration
public ConnectionInfo Info { get; }
Property Value
Type | Description |
---|---|
ConnectionInfo |
InternalRtcpDataChannel
Gets Data Channel for inband signalling.
Declaration
protected DataChannel InternalRtcpDataChannel { get; }
Property Value
Type | Description |
---|---|
DataChannel |
KeepAliveInterval
Gets or sets a value indicating how many milliseconds must elapse between STUN keep-alive binding requests. Defaults to 1000.
Declaration
public int KeepAliveInterval { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
LayoutPriority
Gets or sets the LayoutPriority.
Declaration
public int? LayoutPriority { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
LayoutZone
Gets or sets the LayoutZone.
Declaration
public string LayoutZone { get; set; }
Property Value
Type | Description |
---|---|
System.String |
LocalAudioDirection
Gets the local audio direction. Null if disabled.
Declaration
public string LocalAudioDirection { get; }
Property Value
Type | Description |
---|---|
System.String |
LocalAudioDisabled
Gets if local audio is disabled.
Declaration
public bool LocalAudioDisabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
LocalAudioFormats
Gets or sets the local audio formats.
Declaration
public FormatInfo[] LocalAudioFormats { get; protected set; }
Property Value
Type | Description |
---|---|
FormatInfo[] |
LocalAudioMuted
Gets whether the local audio is muted.
Declaration
public bool LocalAudioMuted { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
LocalDataDirection
Gets the local data direction. Null if disabled.
Declaration
public string LocalDataDirection { get; }
Property Value
Type | Description |
---|---|
System.String |
LocalDataDisabled
Gets if local data is disabled.
Declaration
public bool LocalDataDisabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
LocalDescription
Gets the local description.
Declaration
public SessionDescription LocalDescription { get; }
Property Value
Type | Description |
---|---|
SessionDescription |
LocalDtlsCertificate
Gets or sets the local DTLS certificate.
Declaration
public DtlsCertificate LocalDtlsCertificate { get; set; }
Property Value
Type | Description |
---|---|
DtlsCertificate |
LocalDtlsCertificates
Gets or sets the local DTLS certificates.
Declaration
public DtlsCertificate[] LocalDtlsCertificates { get; set; }
Property Value
Type | Description |
---|---|
DtlsCertificate[] |
LocalVideoDirection
Gets the local video direction. Null if disabled.
Declaration
public string LocalVideoDirection { get; }
Property Value
Type | Description |
---|---|
System.String |
LocalVideoDisabled
Gets if local video is disabled.
Declaration
public bool LocalVideoDisabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
LocalVideoFormats
Gets or sets the local video formats.
Declaration
public FormatInfo[] LocalVideoFormats { get; protected set; }
Property Value
Type | Description |
---|---|
FormatInfo[] |
LocalVideoMuted
Gets whether the local video is muted.
Declaration
public bool LocalVideoMuted { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
MediaId
Gets or sets the media identifier.
Declaration
public string MediaId { get; protected set; }
Property Value
Type | Description |
---|---|
System.String |
MediaIntents
Gets media intents reflected by Gateway.
Declaration
protected string[] MediaIntents { get; }
Property Value
Type | Description |
---|---|
System.String[] |
MediaProtocol
Gets or sets the media protocol in use on this connection.
Declaration
public MediaProtocol MediaProtocol { get; }
Property Value
Type | Description |
---|---|
MediaProtocol |
MediaQuality
Gets the current estimated media quality.
The value ranges from 0.0 to 1.0, where 0.0 is the lowest quality and 1.0 is the highest quality.
Declaration
public double MediaQuality { get; }
Property Value
Type | Description |
---|---|
System.Double |
MultiplexPolicy
Gets or sets the multiplex policy.
Declaration
public MultiplexPolicy MultiplexPolicy { get; set; }
Property Value
Type | Description |
---|---|
MultiplexPolicy |
NetworkQuality
Gets the current estimated network quality.
The value ranges from 0.0 to 1.0, where 0.0 is the lowest quality and 1.0 is the highest quality.
Declaration
public double NetworkQuality { get; }
Property Value
Type | Description |
---|---|
System.Double |
NoMediaServerTimeout
Gets or sets the timeout, in milliseconds, between retries for cases where no Media Servers are available for either ICE servers or SFU/MCU offer processing.
Declaration
public int NoMediaServerTimeout { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
PrivateIPAddress
Gets or sets the private IP address of this device. If set, this will bypass the local network discovery and use this as the sole host candidate.
Declaration
public string PrivateIPAddress { get; set; }
Property Value
Type | Description |
---|---|
System.String |
PrivateIPAddresses
Gets or sets the private IP address of this device. If set, this will bypass the local network discovery and use this as the sole host candidate.
Declaration
public string[] PrivateIPAddresses { get; set; }
Property Value
Type | Description |
---|---|
System.String[] |
RecordingEnabled
Gets or sets whether this connection is being recorded.
Declaration
public bool RecordingEnabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
RemoteAudioDisabled
Gets if remote audio is disabled.
Declaration
public bool RemoteAudioDisabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
RemoteAudioEncoding
Gets or sets the remote audio encoding.
Declaration
public EncodingInfo RemoteAudioEncoding { get; protected set; }
Property Value
Type | Description |
---|---|
EncodingInfo |
RemoteAudioFormats
Gets or sets the remote audio formats.
Declaration
public FormatInfo[] RemoteAudioFormats { get; protected set; }
Property Value
Type | Description |
---|---|
FormatInfo[] |
RemoteAudioMuted
Gets or sets whether the remote audio is muted.
Declaration
public bool RemoteAudioMuted { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
RemoteClosed
Gets a value indicating whether the connection was closed by the remote host.
Declaration
public bool RemoteClosed { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
RemoteConnectionId
Gets or sets the remote connection identifier, if available.
Declaration
public string RemoteConnectionId { get; protected set; }
Property Value
Type | Description |
---|---|
System.String |
RemoteDataDisabled
Gets if remote data is disabled.
Declaration
public bool RemoteDataDisabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
RemoteDescription
Gets the remote description.
Declaration
public SessionDescription RemoteDescription { get; }
Property Value
Type | Description |
---|---|
SessionDescription |
RemoteMediaId
Gets or sets the remote media identifier, if available.
Declaration
public string RemoteMediaId { get; protected set; }
Property Value
Type | Description |
---|---|
System.String |
RemoteRejected
Gets a value indicating whether the connection was rejected by the remote host.
Declaration
public bool RemoteRejected { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
RemoteTag
Gets or sets the remote tag, if applicable.
Declaration
public string RemoteTag { get; protected set; }
Property Value
Type | Description |
---|---|
System.String |
RemoteVideoDisabled
Gets if remote video is disabled.
Declaration
public bool RemoteVideoDisabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
RemoteVideoEncoding
Gets or sets the remote video encoding.
Declaration
public EncodingInfo RemoteVideoEncoding { get; protected set; }
Property Value
Type | Description |
---|---|
EncodingInfo |
RemoteVideoFormats
Gets or sets the remote video formats.
Declaration
public FormatInfo[] RemoteVideoFormats { get; protected set; }
Property Value
Type | Description |
---|---|
FormatInfo[] |
RemoteVideoMuted
Gets or sets whether the remote video is muted.
Declaration
public bool RemoteVideoMuted { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
SignallingState
Gets the state of the signalling.
Declaration
public SignallingState SignallingState { get; }
Property Value
Type | Description |
---|---|
SignallingState |
State
Gets the state of the connection.
Declaration
public ConnectionState State { get; }
Property Value
Type | Description |
---|---|
ConnectionState |
StatsEventInterval
Gets or sets the interval, in milliseconds, between stats events raised locally by OnStats.
The default value is 1000 (1 second).
Declaration
public int StatsEventInterval { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
StatsInterval
Gets or sets the default interval, in milliseconds, between stats reports sent to the Gateway.
The default value is 10,000 (10 seconds).
Declaration
[Obsolete("Use StatsReportInterval instead.")]
public int StatsInterval { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
StatsReportInterval
Gets or sets the interval, in milliseconds, between stats reports sent to the Gateway.
The default value is 10,000 (10 seconds).
Declaration
public int StatsReportInterval { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
StunBindingRequestLimit
Gets or sets the limit on the the number of Turn Allocate request messages when trying to establish allocation on a Turn server.
Declaration
public int StunBindingRequestLimit { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
StunRequestTimeout
Gets or sets the timeout for individual Stun (and Turn) request messages in ms.
Declaration
public int StunRequestTimeout { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Tag
Gets or sets the tag.
Declaration
public string Tag { get; set; }
Property Value
Type | Description |
---|---|
System.String |
TcpConnectTimeout
Gets or sets connection timeout for stream sockets in ms.
Declaration
public int TcpConnectTimeout { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
TestReceivedRtpBuffer
Gets or sets a method that can be used to test and optionally modify inbound RTP buffers.
FOR TESTING PURPOSES ONLY. Returning null
will cause the buffer to be discarded.
Declaration
public Function1<DataBuffer, DataBuffer> TestReceivedRtpBuffer { get; set; }
Property Value
Type | Description |
---|---|
Function1<DataBuffer, DataBuffer> |
TestRoundTripTime
Gets or sets a fixed round-trip time (in milliseconds) to use in the network transport. FOR TESTING PURPOSES ONLY. Defaults to -1, which indicates that normal round-trip time calculations should be used.
Declaration
public int TestRoundTripTime { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
TestSendingRtpBuffer
Gets or sets a method that can be used to test and optionally modify outbound RTP buffers.
FOR TESTING PURPOSES ONLY. Returning null
will cause the buffer to be discarded.
Declaration
public Function1<DataBuffer, DataBuffer> TestSendingRtpBuffer { get; set; }
Property Value
Type | Description |
---|---|
Function1<DataBuffer, DataBuffer> |
TrickleIcePolicy
Gets or sets the trickle-ICE policy.
Declaration
public TrickleIcePolicy TrickleIcePolicy { get; set; }
Property Value
Type | Description |
---|---|
TrickleIcePolicy |
TurnAllocateRequestLimit
Gets or sets the limit on the the number of Turn Allocate request messages when trying to establish allocation on a Turn server.
Declaration
public int TurnAllocateRequestLimit { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Type
Gets the connection type.
Declaration
public string Type { get; }
Property Value
Type | Description |
---|---|
System.String |
UserId
Gets the user identifier.
Declaration
public string UserId { get; }
Property Value
Type | Description |
---|---|
System.String |
UseWebSocketsForMedia
Gets or sets if we should use websockets for sending media.
Declaration
public bool UseWebSocketsForMedia { get; protected set; }
Property Value
Type | Description |
---|---|
System.Boolean |
VideoDirection
Gets the video direction. Null if disabled.
Declaration
public string VideoDirection { get; }
Property Value
Type | Description |
---|---|
System.String |
VideoStream
Gets the video stream.
Declaration
public VideoStream VideoStream { get; }
Property Value
Type | Description |
---|---|
VideoStream |
VideoUnmuteDisabled
Gets whether the ability to unmute video is disabled.
Declaration
public bool VideoUnmuteDisabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
WmsAddress
Gets or sets the WMS endpoint address.
Declaration
public string WmsAddress { get; set; }
Property Value
Type | Description |
---|---|
System.String |
WmsConnectionToken
Gets or sets WMS connection token.
Declaration
public string WmsConnectionToken { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
Close()
Closes the connection.
Declaration
public Future<object> Close()
Returns
Type | Description |
---|---|
Future<System.Object> |
DetachInternalEventHandlers()
Detaches internal event handlers.
Declaration
protected virtual void DetachInternalEventHandlers()
DoCreateCandidateMessage(Candidate)
Creates a candidate message.
Declaration
protected abstract Message DoCreateCandidateMessage(Candidate candidate)
Parameters
Type | Name | Description |
---|---|---|
Candidate | candidate | The candidate. |
Returns
Type | Description |
---|---|
Message |
DoCreateCloseMessage()
Creates a close message.
Declaration
protected abstract Message DoCreateCloseMessage()
Returns
Type | Description |
---|---|
Message |
DoCreateUpdateMessage(ConnectionConfig)
Creates an update message.
Declaration
protected virtual Message DoCreateUpdateMessage(ConnectionConfig config)
Parameters
Type | Name | Description |
---|---|---|
ConnectionConfig | config | The connection config. |
Returns
Type | Description |
---|---|
Message |
DoCreateUseWebSocketServiceMessage()
Create the message to use web sockets for media
Declaration
protected virtual Message DoCreateUseWebSocketServiceMessage()
Returns
Type | Description |
---|---|
Message |
DoOpen()
Opens the connection.
Declaration
protected abstract void DoOpen()
DoProcessMessage(Message)
Processes a message.
Declaration
protected abstract void DoProcessMessage(Message message)
Parameters
Type | Name | Description |
---|---|---|
Message | message | The message. |
GetStats()
Gets the current connection stats.
Declaration
public Future<ConnectionStats> GetStats()
Returns
Type | Description |
---|---|
Future<ConnectionStats> |
IsMediaDirectionAllowed(String)
Gets a value indicating whether the given direction is allowed for this connection.
Declaration
protected abstract bool IsMediaDirectionAllowed(string direction)
Parameters
Type | Name | Description |
---|---|---|
System.String | direction | The direction. |
Returns
Type | Description |
---|---|
System.Boolean |
Open()
Opens the connection.
Declaration
public Future<object> Open()
Returns
Type | Description |
---|---|
Future<System.Object> |
ProcessAnswer(Message)
Processes an answer.
Declaration
protected abstract void ProcessAnswer(Message message)
Parameters
Type | Name | Description |
---|---|---|
Message | message | The message. |
ProcessError(Message)
Processes an error message.
Declaration
protected virtual void ProcessError(Message message)
Parameters
Type | Name | Description |
---|---|---|
Message | message | The message. |
ProcessIceServers(Message)
Processes an iceServers message.
Declaration
protected virtual void ProcessIceServers(Message message)
Parameters
Type | Name | Description |
---|---|---|
Message | message | The message. |
ProcessLocalError(Error)
Processes a local failure.
Declaration
protected void ProcessLocalError(Error error)
Parameters
Type | Name | Description |
---|---|---|
Error | error | The error. |
ProcessMediaIntentResponse(Message)
Processes an iceServers message.
Declaration
protected virtual void ProcessMediaIntentResponse(Message message)
Parameters
Type | Name | Description |
---|---|---|
Message | message | The message. |
ProcessRtcpDataChannelSignallingActivation(Message)
Processes inband signalling activation.
Declaration
protected virtual void ProcessRtcpDataChannelSignallingActivation(Message message)
Parameters
Type | Name | Description |
---|---|---|
Message | message |
RaiseAudioBitrateNotification(AudioStream, BitrateNotification)
Raises an audio bitrate notification.
Declaration
protected virtual void RaiseAudioBitrateNotification(AudioStream audioStream, BitrateNotification bitrateNotification)
Parameters
Type | Name | Description |
---|---|---|
AudioStream | audioStream | The audio stream. |
BitrateNotification | bitrateNotification | The bitrate notification. |
RaiseAudioBitrateRequest(AudioStream, BitrateRequest)
Raises an audio bitrate request.
Declaration
protected virtual void RaiseAudioBitrateRequest(AudioStream audioStream, BitrateRequest bitrateRequest)
Parameters
Type | Name | Description |
---|---|---|
AudioStream | audioStream | The audio stream. |
BitrateRequest | bitrateRequest | The bitrate request. |
RaiseLocalCandidate(Candidate)
Raises a local candidate.
Declaration
protected void RaiseLocalCandidate(Candidate localCandidate)
Parameters
Type | Name | Description |
---|---|---|
Candidate | localCandidate | The local candidate. |
RaiseNoMediaServersAvailable(NoMediaServersAvailableEventArgs)
Raises the OnNoMediaServersAvailable event.
Declaration
protected virtual void RaiseNoMediaServersAvailable(NoMediaServersAvailableEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
NoMediaServersAvailableEventArgs | args |
RaiseNoWebSocketMediaServersAvailable(NoWebSocketMediaServersAvailableEventArgs)
Raises the OnNoWebSocketMediaServersAvailable event.
Declaration
protected virtual void RaiseNoWebSocketMediaServersAvailable(NoWebSocketMediaServersAvailableEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
NoWebSocketMediaServersAvailableEventArgs | args |
RaiseRemoteCandidate(Candidate)
Raises a remote candidate.
Declaration
protected void RaiseRemoteCandidate(Candidate remoteCandidate)
Parameters
Type | Name | Description |
---|---|---|
Candidate | remoteCandidate | The remote candidate. |
RaiseVideoBitrateNotification(VideoStream, BitrateNotification)
Raises a video bitrate notification.
Declaration
protected virtual void RaiseVideoBitrateNotification(VideoStream videoStream, BitrateNotification bitrateNotification)
Parameters
Type | Name | Description |
---|---|---|
VideoStream | videoStream | The video stream. |
BitrateNotification | bitrateNotification | The bitrate notification. |
RaiseVideoBitrateRequest(VideoStream, BitrateRequest)
Raises a video bitrate request.
Declaration
protected virtual void RaiseVideoBitrateRequest(VideoStream videoStream, BitrateRequest bitrateRequest)
Parameters
Type | Name | Description |
---|---|---|
VideoStream | videoStream | The video stream. |
BitrateRequest | bitrateRequest | The bitrate request. |
Send(Message)
Sends a message.
Declaration
protected virtual Future<Message> Send(Message message)
Parameters
Type | Name | Description |
---|---|---|
Message | message | The message. |
Returns
Type | Description |
---|---|
Future<Message> |
TrySendRtcpDataChannel(Message)
Sends bitrate messages.
Declaration
protected virtual bool TrySendRtcpDataChannel(Message message)
Parameters
Type | Name | Description |
---|---|---|
Message | message | The message to send. |
Returns
Type | Description |
---|---|
System.Boolean |
Update(ConnectionConfig)
Updates this connection.
Declaration
public Future<object> Update(ConnectionConfig config)
Parameters
Type | Name | Description |
---|---|---|
ConnectionConfig | config | The connection configuration. |
Returns
Type | Description |
---|---|
Future<System.Object> | A future that resolves when the connection has been updated. |
Events
OnAudioUnmuteDisabled
Raised when the ability to unmute audio is disabled.
Declaration
public event Action0 OnAudioUnmuteDisabled
Event Type
Type | Description |
---|---|
Action0 |
OnAudioUnmuteEnabled
Raised when the ability to unmute audio is enabled.
Declaration
public event Action0 OnAudioUnmuteEnabled
Event Type
Type | Description |
---|---|
Action0 |
OnAutomaticIceServers
Raised when automatic ICE servers have been received. Parameters:
- connection - the connection
- automaticIceServers - the automatic ICE severs collection
Declaration
public event Action2<ManagedConnection, IceServerCollection> OnAutomaticIceServers
Event Type
Type | Description |
---|---|
Action2<ManagedConnection, IceServerCollection> |
OnGatheringStateChange
Raised when the ICE gathering state changes. Parameters:
- connection - the connection
Declaration
public event Action1<ManagedConnection> OnGatheringStateChange
Event Type
Type | Description |
---|---|
Action1<ManagedConnection> |
OnIceConnectionStateChange
Raised when the ICE connection state changes. Parameters:
- connection - the connection
Declaration
public event Action1<ManagedConnection> OnIceConnectionStateChange
Event Type
Type | Description |
---|---|
Action1<ManagedConnection> |
OnLocalCandidate
Raised when a local candidate is ready. Parameters:
- connection - the connection
- candidate - the local candidate
Declaration
public event Action2<ManagedConnection, Candidate> OnLocalCandidate
Event Type
Type | Description |
---|---|
Action2<ManagedConnection, Candidate> |
OnLocalDescription
Raised when the local description is ready. Parameters:
- connection - the connection
- description - the local description
Declaration
public event Action2<ManagedConnection, SessionDescription> OnLocalDescription
Event Type
Type | Description |
---|---|
Action2<ManagedConnection, SessionDescription> |
OnMediaQuality
Raised every StatsEventInterval milliseconds with the current estimated media quality.
The value ranges from 0.0 to 1.0, where 0.0 is the lowest quality and 1.0 is the highest quality.
Declaration
public event Action1<double> OnMediaQuality
Event Type
Type | Description |
---|---|
Action1<System.Double> |
OnNetworkQuality
Raised every StatsEventInterval milliseconds with the current estimated network quality.
The value ranges from 0.0 to 1.0, where 0.0 is the lowest quality and 1.0 is the highest quality.
Declaration
public event Action1<double> OnNetworkQuality
Event Type
Type | Description |
---|---|
Action1<System.Double> |
OnNoMediaServersAvailable
Raised when there are no Media Servers available.
Declaration
public event Action2<ManagedConnection, NoMediaServersAvailableEventArgs> OnNoMediaServersAvailable
Event Type
Type | Description |
---|---|
Action2<ManagedConnection, NoMediaServersAvailableEventArgs> |
OnNoWebSocketMediaServersAvailable
Raised when there are no WebSocket Media Servers available.
Declaration
public event Action2<ManagedConnection, NoWebSocketMediaServersAvailableEventArgs> OnNoWebSocketMediaServersAvailable
Event Type
Type | Description |
---|---|
Action2<ManagedConnection, NoWebSocketMediaServersAvailableEventArgs> |
OnRecordingDisabled
Raised when this connection is no longer being recorded.
Declaration
public event Action1<string> OnRecordingDisabled
Event Type
Type | Description |
---|---|
Action1<System.String> |
OnRecordingEnabled
Raised when this connection is being recorded.
Declaration
public event Action1<string> OnRecordingEnabled
Event Type
Type | Description |
---|---|
Action1<System.String> |
OnRemoteAudioEncodingSwitch
Raised when the remote audio encoding is switched by the server.
Declaration
public event Action2<EncodingInfo, EncodingInfo> OnRemoteAudioEncodingSwitch
Event Type
Type | Description |
---|---|
Action2<EncodingInfo, EncodingInfo> |
OnRemoteCandidate
Raised when a remote candidate is ready. Parameters:
- connection - the connection
- candidate - the remote candidate
Declaration
public event Action2<ManagedConnection, Candidate> OnRemoteCandidate
Event Type
Type | Description |
---|---|
Action2<ManagedConnection, Candidate> |
OnRemoteDescription
Raised when the remote description is ready. Parameters:
- connection - the connection
- description - the remote description
Declaration
public event Action2<ManagedConnection, SessionDescription> OnRemoteDescription
Event Type
Type | Description |
---|---|
Action2<ManagedConnection, SessionDescription> |
OnRemoteUpdate
Raised when a remote connection has been updated.
Declaration
public event Action2<ConnectionInfo, ConnectionInfo> OnRemoteUpdate
Event Type
Type | Description |
---|---|
Action2<ConnectionInfo, ConnectionInfo> |
OnRemoteVideoEncodingSwitch
Raised when the remote video encoding is switched by the server.
Declaration
public event Action2<EncodingInfo, EncodingInfo> OnRemoteVideoEncodingSwitch
Event Type
Type | Description |
---|---|
Action2<EncodingInfo, EncodingInfo> |
OnSignallingStateChange
Raised when the signalling state changes. Parameters:
- connection - the connection
Declaration
public event Action1<ManagedConnection> OnSignallingStateChange
Event Type
Type | Description |
---|---|
Action1<ManagedConnection> |
OnStateChange
Raised when the connection state changes. Parameters:
- connection - the connection
Declaration
public event Action1<ManagedConnection> OnStateChange
Event Type
Type | Description |
---|---|
Action1<ManagedConnection> |
OnStats
Raised every StatsEventInterval milliseconds with the current connection stats.
Declaration
public event Action1<ConnectionStats> OnStats
Event Type
Type | Description |
---|---|
Action1<ConnectionStats> |
OnVideoUnmuteDisabled
Raised when the ability to unmute video is disabled.
Declaration
public event Action0 OnVideoUnmuteDisabled
Event Type
Type | Description |
---|---|
Action0 |
OnVideoUnmuteEnabled
Raised when the ability to unmute video is enabled.
Declaration
public event Action0 OnVideoUnmuteEnabled
Event Type
Type | Description |
---|---|
Action0 |