@telnyx/webrtc 2.27.0-beta.6 → 2.27.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/bundle.js +1 -1
- package/lib/bundle.mjs +1 -1
- package/lib/src/Modules/Verto/BaseSession.d.ts +2 -2
- package/lib/src/Modules/Verto/services/SignalingHealthMonitor.d.ts +1 -1
- package/lib/src/Modules/Verto/util/interfaces/SignalingHealth.d.ts +6 -1
- package/lib/src/Modules/Verto/util/interfaces.d.ts +1 -0
- package/lib/src/Modules/Verto/webrtc/Peer.d.ts +5 -3
- package/lib/src/utils/interfaces.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Logger } from 'loglevel';
|
|
2
2
|
import BaseMessage from './messages/BaseMessage';
|
|
3
3
|
import Connection from './services/Connection';
|
|
4
|
-
import type { PeerFailureEvidence } from './util/interfaces/SignalingHealth';
|
|
4
|
+
import type { PeerFailureEvidence, TriggerIceRestartResult } from './util/interfaces/SignalingHealth';
|
|
5
5
|
import { SwEvent } from './util/constants';
|
|
6
6
|
import type { ITelnyxErrorEvent } from './util/errors';
|
|
7
7
|
import { BroadcastParams, ILoginParams, IVertoOptions } from './util/interfaces';
|
|
@@ -100,7 +100,7 @@ export default abstract class BaseSession {
|
|
|
100
100
|
hasActiveCall(): boolean;
|
|
101
101
|
startSignalingHealthMonitor(): void;
|
|
102
102
|
stopSignalingHealthMonitor(): void;
|
|
103
|
-
triggerIceRestart(callId: string):
|
|
103
|
+
triggerIceRestart(callId: string): TriggerIceRestartResult;
|
|
104
104
|
onSignalingRequestTimeout(requestId: string, timeoutMs: number, method?: string): void;
|
|
105
105
|
reportPeerFailure(callId: string, evidence: PeerFailureEvidence): void;
|
|
106
106
|
reportNoRtp(callId: string, direction: 'inbound' | 'outbound'): void;
|
|
@@ -5,7 +5,6 @@ export default class SignalingHealthMonitor {
|
|
|
5
5
|
private _lastProbeSentAt;
|
|
6
6
|
private _probeInFlight;
|
|
7
7
|
private _intervalId;
|
|
8
|
-
private _recoveryGeneration;
|
|
9
8
|
private _pendingMediaRecovery;
|
|
10
9
|
private static readonly CRITICAL_METHODS;
|
|
11
10
|
static isCriticalMethod(method: string): boolean;
|
|
@@ -15,6 +14,7 @@ export default class SignalingHealthMonitor {
|
|
|
15
14
|
get isRunning(): boolean;
|
|
16
15
|
get isProbeInFlight(): boolean;
|
|
17
16
|
onSocketActivity(): void;
|
|
17
|
+
private _resolveProbe;
|
|
18
18
|
private _probeIfNeeded;
|
|
19
19
|
onRequestTimeout(requestId: string, timeoutMs: number, method?: string): void;
|
|
20
20
|
onPeerFailure(callId: string, evidence: PeerFailureEvidence): void;
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import type Connection from '../../services/Connection';
|
|
2
2
|
export declare type PeerFailureEvidence = 'ice_failed' | 'connection_failed';
|
|
3
|
+
export declare type TriggerIceRestartResult = {
|
|
4
|
+
started: boolean;
|
|
5
|
+
reason?: string;
|
|
6
|
+
recoverSignaling?: boolean;
|
|
7
|
+
};
|
|
3
8
|
export interface ISignalingHealthSession {
|
|
4
9
|
uuid: string;
|
|
5
10
|
sessionid: string;
|
|
6
11
|
connection: Connection | null;
|
|
7
12
|
hasActiveCall(): boolean;
|
|
8
13
|
socketDisconnect(): void;
|
|
9
|
-
triggerIceRestart(callId: string):
|
|
14
|
+
triggerIceRestart(callId: string): TriggerIceRestartResult;
|
|
10
15
|
}
|
|
@@ -2,6 +2,10 @@ import BrowserSession from '../BrowserSession';
|
|
|
2
2
|
import { WebRTCStatsReporter } from '../util/debug';
|
|
3
3
|
import { PeerType } from './constants';
|
|
4
4
|
import { IVertoCallOptions } from './interfaces';
|
|
5
|
+
export declare type RestartIceResult = {
|
|
6
|
+
started: boolean;
|
|
7
|
+
reason?: string;
|
|
8
|
+
};
|
|
5
9
|
export default class Peer {
|
|
6
10
|
type: PeerType;
|
|
7
11
|
private options;
|
|
@@ -25,11 +29,9 @@ export default class Peer {
|
|
|
25
29
|
private _timingsCollected;
|
|
26
30
|
private _iceRestartTimeoutId;
|
|
27
31
|
private static readonly ICE_RESTART_TIMEOUT_MS;
|
|
28
|
-
private _hadOfflineEvent;
|
|
29
|
-
private _offlineHandler;
|
|
30
32
|
constructor(type: PeerType, options: IVertoCallOptions, session: BrowserSession, trickleIceSdpFn: (sdp: RTCSessionDescriptionInit) => void, registerPeerEvents: (instance: RTCPeerConnection) => void);
|
|
31
33
|
finishIceRestart(): void;
|
|
32
|
-
restartIce():
|
|
34
|
+
restartIce(): RestartIceResult;
|
|
33
35
|
get isOffer(): boolean;
|
|
34
36
|
get isAnswer(): boolean;
|
|
35
37
|
get isDebugEnabled(): boolean;
|