Interface IConnection<TConnection, TStream, TAudioStream, TVideoStream, TDataStream>
Connection interface.
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public interface IConnection<TConnection, TStream, TAudioStream, TVideoStream, TDataStream>
Type Parameters
Name | Description |
---|---|
TConnection | |
TStream | |
TAudioStream | |
TVideoStream | |
TDataStream |
Properties
AudioStream
Gets the first audio stream.
Declaration
TAudioStream AudioStream { get; }
Property Value
Type | Description |
---|---|
TAudio |
AudioStreams
Gets the audio streams.
Declaration
TAudioStream[] AudioStreams { get; }
Property Value
Type | Description |
---|---|
TAudioStream[] |
BundlePolicy
Gets or sets the bundle policy for this connection.
Declaration
BundlePolicy BundlePolicy { get; set; }
Property Value
Type | Description |
---|---|
Bundle |
CanonicalName
Gets the canonical name.
Declaration
string CanonicalName { get; }
Property Value
Type | Description |
---|---|
System. |
DataStream
Gets the first data stream.
Declaration
TDataStream DataStream { get; }
Property Value
Type | Description |
---|---|
TData |
DataStreams
Gets the data streams.
Declaration
TDataStream[] DataStreams { get; }
Property Value
Type | Description |
---|---|
TDataStream[] |
DeadStreamTimeout
Gets or sets the amount of time (in milliseconds) to wait for connectivity checks to re-establish after they start to fail on a live connection. Defaults to 10,000.
Declaration
int DeadStreamTimeout { get; set; }
Property Value
Type | Description |
---|---|
System. |
Error
Gets or sets the error.
Declaration
Error Error { get; set; }
Property Value
Type | Description |
---|---|
Error |
ExternalId
Gets or sets the external identifier.
Declaration
string ExternalId { get; set; }
Property Value
Type | Description |
---|---|
System. |
GatheringState
Gets or sets the ICE gathering state.
Declaration
IceGatheringState GatheringState { get; }
Property Value
Type | Description |
---|---|
Ice |
HasAudio
Gets whether this connection has an audio stream.
Declaration
bool HasAudio { get; }
Property Value
Type | Description |
---|---|
System. |
HasData
Gets whether this connection has a data stream.
Declaration
bool HasData { get; }
Property Value
Type | Description |
---|---|
System. |
HasVideo
Gets whether this connection has a video stream.
Declaration
bool HasVideo { get; }
Property Value
Type | Description |
---|---|
System. |
IceConnectionState
Gets or sets the ICE connection state.
Declaration
IceConnectionState IceConnectionState { get; }
Property Value
Type | Description |
---|---|
Ice |
IceGatherPolicy
Gets or sets the ICE gather policy.
Declaration
IceGatherPolicy IceGatherPolicy { get; set; }
Property Value
Type | Description |
---|---|
Ice |
IceServer
Gets or sets the ICE server.
Declaration
IceServer IceServer { get; set; }
Property Value
Type | Description |
---|---|
Ice |
IceServers
Gets or sets the ICE servers.
Declaration
IceServer[] IceServers { get; set; }
Property Value
Type | Description |
---|---|
Ice |
Id
Gets the identifier.
Declaration
string Id { get; }
Property Value
Type | Description |
---|---|
System. |
LegacyTimeout
Gets or sets a value indicating whether legacy Connection.Timeout should be used. When disabled, Connection.Timeout only accounts for the time spent trying to establish connectivity (i.e. time it takes to transition from the Connecting to the Connected state; from the time point when both offer and answer had been set to the connection being fully established). When enabled, Connection.Timeout accounts for the time spent from receiving an offer (or creating an offer) to establishing connectivity (i.e. time it takes to transition from Initializing to Connected state). By default, LegacyTimeout is set to true, so that existing behavior is preserved. However, in the future default will be updated to false. This means that IL will not account for any signalling delays that may occur while establishing connectivity. This option will be later deprecated.
Declaration
bool LegacyTimeout { get; set; }
Property Value
Type | Description |
---|---|
System. |
LocalDescription
Gets the local description.
Declaration
SessionDescription LocalDescription { get; }
Property Value
Type | Description |
---|---|
Session |
MediaProtocol
Gets the media protocol in use on this connection.
Declaration
MediaProtocol MediaProtocol { get; }
Property Value
Type | Description |
---|---|
Media |
RemoteDescription
Gets the remote description.
Declaration
SessionDescription RemoteDescription { get; }
Property Value
Type | Description |
---|---|
Session |
SignallingState
Gets the current signalling state.
Declaration
SignallingState SignallingState { get; }
Property Value
Type | Description |
---|---|
Signalling |
State
Gets the current state.
Declaration
ConnectionState State { get; }
Property Value
Type | Description |
---|---|
Connection |
Streams
Gets the streams.
Declaration
TStream[] Streams { get; }
Property Value
Type | Description |
---|---|
TStream[] |
TieBreaker
Gets or sets the tie breaker.
Declaration
string TieBreaker { get; set; }
Property Value
Type | Description |
---|---|
System. |
Timeout
Gets or sets the amount of time (in milliseconds) to wait for a connection to establish before giving up and closing it. Defaults to 30,000.
Declaration
int Timeout { get; set; }
Property Value
Type | Description |
---|---|
System. |
TrickleIcePolicy
Gets or sets the trickle ICE policy.
Declaration
TrickleIcePolicy TrickleIcePolicy { get; set; }
Property Value
Type | Description |
---|---|
Trickle |
VideoStream
Gets the first video stream.
Declaration
TVideoStream VideoStream { get; }
Property Value
Type | Description |
---|---|
TVideo |
VideoStreams
Gets the video streams.
Declaration
TVideoStream[] VideoStreams { get; }
Property Value
Type | Description |
---|---|
TVideoStream[] |
Methods
AddIceServer(IceServer)
Adds an ICE server.
Declaration
void AddIceServer(IceServer iceServer)
Parameters
Type | Name | Description |
---|---|---|
Ice |
iceServer |
AddIceServers(IceServer[])
Adds some ICE servers.
Declaration
void AddIceServers(IceServer[] iceServers)
Parameters
Type | Name | Description |
---|---|---|
Ice |
iceServers |
AddRemoteCandidate(Candidate)
Adds the remote candidate.
Declaration
Future<Candidate> AddRemoteCandidate(Candidate remoteCandidate)
Parameters
Type | Name | Description |
---|---|---|
Candidate | remoteCandidate |
Returns
Close()
Closes this instance.
Declaration
bool Close()
Returns
Type | Description |
---|---|
System. |
CreateAnswer()
Creates an answer.
Declaration
Future<SessionDescription> CreateAnswer()
Returns
Type | Description |
---|---|
Future<Session |
CreateOffer()
Creates an offer.
Declaration
Future<SessionDescription> CreateOffer()
Returns
Type | Description |
---|---|
Future<Session |
GetStats()
Gets connection stats.
Declaration
Future<ConnectionStats> GetStats()
Returns
Type | Description |
---|---|
Future<Connection |
RemoveIceServer(IceServer)
Removes an ICE server.
Declaration
void RemoveIceServer(IceServer iceServer)
Parameters
Type | Name | Description |
---|---|---|
Ice |
iceServer |
RemoveIceServers(IceServer[])
Removes some ICE servers.
Declaration
void RemoveIceServers(IceServer[] iceServers)
Parameters
Type | Name | Description |
---|---|---|
Ice |
iceServers |
SetLocalDescription(SessionDescription)
Sets the local description.
Declaration
Future<SessionDescription> SetLocalDescription(SessionDescription localDescription)
Parameters
Type | Name | Description |
---|---|---|
Session |
localDescription |
Returns
Type | Description |
---|---|
Future<Session |
SetRemoteDescription(SessionDescription)
Sets the remote description.
Declaration
Future<SessionDescription> SetRemoteDescription(SessionDescription remoteDescription)
Parameters
Type | Name | Description |
---|---|---|
Session |
remoteDescription |
Returns
Type | Description |
---|---|
Future<Session |
Events
OnExternalIdChange
Raised when external connection Id changes.
Declaration
event Action2<string, string> OnExternalIdChange
Event Type
Type | Description |
---|---|
Action2<System. |
OnGatheringStateChange
Raised when the gathering state changes.
Declaration
event Action1<TConnection> OnGatheringStateChange
Event Type
Type | Description |
---|---|
Action1<TConnection> |
OnIceConnectionStateChange
Raised when the Ice connection state changes.
Declaration
event Action1<TConnection> OnIceConnectionStateChange
Event Type
Type | Description |
---|---|
Action1<TConnection> |
OnLocalCandidate
Raised when a local candidate is added.
Declaration
event Action2<TConnection, Candidate> OnLocalCandidate
Event Type
OnLocalDescription
Raised when a local description is set.
Declaration
event Action2<TConnection, SessionDescription> OnLocalDescription
Event Type
Type | Description |
---|---|
Action2<TConnection, Session |
OnRemoteCandidate
Raised when a remote candidate is added.
Declaration
event Action2<TConnection, Candidate> OnRemoteCandidate
Event Type
OnRemoteDescription
Raised when a remote description is set.
Declaration
event Action2<TConnection, SessionDescription> OnRemoteDescription
Event Type
Type | Description |
---|---|
Action2<TConnection, Session |
OnSignallingStateChange
Raised when the signalling state changes.
Declaration
event Action1<TConnection> OnSignallingStateChange
Event Type
Type | Description |
---|---|
Action1<TConnection> |
OnStateChange
Raised when the connection state changes.
Declaration
event Action1<TConnection> OnStateChange
Event Type
Type | Description |
---|---|
Action1<TConnection> |