/ fm / liveswitch / ConnectionStateLedger
Class: ConnectionStateLedger
fm.liveswitch.ConnectionStateLedger
Maintains a ledger of connection state transitions with timestamps. Tracks the history of state changes for a specific connection.
Table of contents
Constructors
Methods
- fmliveswitchConnectionStateLedgerInit
- getTypeString
- recordAnswer
- recordConnectionState
- recordError
- recordMediaIntent
- recordOffer
- toString
Constructors
constructor
+ new ConnectionStateLedger(connectionId
: string, client
: boolean, connectionType
: string, clientId
: string, mediaProtocol
: MediaProtocol): ConnectionStateLedger
Initializes a new instance of the ConnectionStateLedger class.
Parameters:
Name | Type | Description |
---|---|---|
connectionId |
string | The unique identifier for the connection to track. |
client |
boolean | Indicates whether this ledger is for the client rather than for a server. |
connectionType |
string | Indicates the connection type. |
clientId |
string | The unique identifier for the client. |
mediaProtocol |
MediaProtocol | The mediaprotocol of this connection. |
Returns: ConnectionStateLedger
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStateLedger.ts:31
Methods
fmliveswitchConnectionStateLedgerInit
▸ Private
fmliveswitchConnectionStateLedgerInit(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStateLedger.ts:28
getTypeString
▸ getTypeString(): string
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStateLedger.ts:10
recordAnswer
▸ recordAnswer(state
: ConnectionState, sent
: boolean, renegotiation
: boolean): void
Records an offer.
Parameters:
Name | Type |
---|---|
state |
ConnectionState |
sent |
boolean |
renegotiation |
boolean |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStateLedger.ts:79
recordConnectionState
▸ recordConnectionState(state
: ConnectionState): void
Records a new connection state transition with current timestamp.
Parameters:
Name | Type | Description |
---|---|---|
state |
ConnectionState | The new connection state to record. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStateLedger.ts:100
recordError
▸ recordError(state
: ConnectionState, error
: string): void
Records an error.
Parameters:
Name | Type |
---|---|
state |
ConnectionState |
error |
string |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStateLedger.ts:116
recordMediaIntent
▸ recordMediaIntent(state
: ConnectionState, sent
: boolean): void
Records a media intent with current timestamp.
Parameters:
Name | Type |
---|---|
state |
ConnectionState |
sent |
boolean |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStateLedger.ts:133
recordOffer
▸ recordOffer(state
: ConnectionState, sent
: boolean, renegotiation
: boolean): void
Records an offer.
Parameters:
Name | Type |
---|---|
state |
ConnectionState |
sent |
boolean |
renegotiation |
boolean |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStateLedger.ts:151
toString
▸ toString(): string
Provides a string representation of all recorded state transitions.
Returns: string
A formatted string showing all state transitions with timestamps and durations.
Defined in: Generated/TypeScript/fm.liveswitch/ConnectionStateLedger.ts:180