Interface IConnection<TConnection, TStream, TAudioStream, TVideoStream, TDataStream>
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 |
TAudioStream |
|
AudioStreams
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
CanonicalName
Declaration
string CanonicalName { get; }
Property Value
Type |
Description |
System.String |
|
DataStream
Gets the first data stream.
Declaration
TDataStream DataStream { get; }
Property Value
Type |
Description |
TDataStream |
|
DataStreams
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.Int32 |
|
Error
Declaration
Error Error { get; set; }
Property Value
ExternalId
Gets or sets the external identifier.
Declaration
string ExternalId { get; set; }
Property Value
Type |
Description |
System.String |
|
GatheringState
Gets or sets the ICE gathering state.
Declaration
IceGatheringState GatheringState { get; }
Property Value
HasAudio
Gets whether this connection has an audio stream.
Declaration
Property Value
Type |
Description |
System.Boolean |
|
HasData
Gets whether this connection has a data stream.
Declaration
Property Value
Type |
Description |
System.Boolean |
|
HasVideo
Gets whether this connection has a video stream.
Declaration
Property Value
Type |
Description |
System.Boolean |
|
IceConnectionState
Gets or sets the ICE connection state.
Declaration
IceConnectionState IceConnectionState { get; }
Property Value
IceGatherPolicy
Gets or sets the ICE gather policy.
Declaration
IceGatherPolicy IceGatherPolicy { get; set; }
Property Value
IceServer
Gets or sets the ICE server.
Declaration
IceServer IceServer { get; set; }
Property Value
IceServers
Gets or sets the ICE servers.
Declaration
IceServer[] IceServers { get; set; }
Property Value
Id
Declaration
Property Value
Type |
Description |
System.String |
|
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.Boolean |
|
LocalDescription
Gets the local description.
Declaration
SessionDescription LocalDescription { get; }
Property Value
Gets the media protocol in use on this connection.
Declaration
MediaProtocol MediaProtocol { get; }
Property Value
RemoteDescription
Gets the remote description.
Declaration
SessionDescription RemoteDescription { get; }
Property Value
SignallingState
Gets the current signalling state.
Declaration
SignallingState SignallingState { get; }
Property Value
State
Declaration
ConnectionState State { get; }
Property Value
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.String |
|
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.Int32 |
|
TrickleIcePolicy
Gets or sets the trickle ICE policy.
Declaration
TrickleIcePolicy TrickleIcePolicy { get; set; }
Property Value
VideoStream
Gets the first video stream.
Declaration
TVideoStream VideoStream { get; }
Property Value
Type |
Description |
TVideoStream |
|
VideoStreams
Declaration
TVideoStream[] VideoStreams { get; }
Property Value
Type |
Description |
TVideoStream[] |
|
Methods
AddIceServer(IceServer)
Declaration
void AddIceServer(IceServer iceServer)
Parameters
AddIceServers(IceServer[])
Declaration
void AddIceServers(IceServer[] iceServers)
Parameters
AddRemoteCandidate(Candidate)
Adds the remote candidate.
Declaration
Future<Candidate> AddRemoteCandidate(Candidate remoteCandidate)
Parameters
Type |
Name |
Description |
Candidate |
remoteCandidate |
|
Returns
Close()
Declaration
Returns
Type |
Description |
System.Boolean |
|
CreateAnswer()
Declaration
Future<SessionDescription> CreateAnswer()
Returns
CreateOffer()
Declaration
Future<SessionDescription> CreateOffer()
Returns
GetStats()
Declaration
Future<ConnectionStats> GetStats()
Returns
RemoveIceServer(IceServer)
Declaration
void RemoveIceServer(IceServer iceServer)
Parameters
RemoveIceServers(IceServer[])
Removes some ICE servers.
Declaration
void RemoveIceServers(IceServer[] iceServers)
Parameters
SetLocalDescription(SessionDescription)
Sets the local description.
Declaration
Future<SessionDescription> SetLocalDescription(SessionDescription localDescription)
Parameters
Returns
SetRemoteDescription(SessionDescription)
Sets the remote description.
Declaration
Future<SessionDescription> SetRemoteDescription(SessionDescription remoteDescription)
Parameters
Returns
Events
OnExternalIdChange
Raised when external connection Id changes.
Declaration
event Action2<string, string> OnExternalIdChange
Event Type
Type |
Description |
Action2<System.String, System.String> |
|
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
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
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> |
|