@100mslive/hms-video-store 0.15.2-alpha.3 → 0.15.2-alpha.5
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/dist/analytics/AnalyticsEventFactory.d.ts +18 -5
- package/dist/connection/HMSConnection.d.ts +8 -1
- package/dist/index.cjs.js +14 -14
- package/dist/index.cjs.js.map +3 -3
- package/dist/index.js +14 -14
- package/dist/index.js.map +3 -3
- package/dist/transport/RetryScheduler.d.ts +2 -0
- package/dist/transport/index.d.ts +40 -0
- package/dist/transport/models/PublishAnswerDiscardReason.d.ts +16 -0
- package/package.json +2 -2
|
@@ -6,6 +6,7 @@ import { HMSException } from '../error/HMSException';
|
|
|
6
6
|
import { DeviceMap, SelectedDevices } from '../interfaces';
|
|
7
7
|
import { HMSTrackSettings } from '../media/settings/HMSTrackSettings';
|
|
8
8
|
import { HMSRemoteVideoTrack } from '../media/tracks/HMSRemoteVideoTrack';
|
|
9
|
+
import { PublishAnswerDiscardReason } from '../transport/models/PublishAnswerDiscardReason';
|
|
9
10
|
export default class AnalyticsEventFactory {
|
|
10
11
|
private static KEY_REQUESTED_AT;
|
|
11
12
|
private static KEY_RESPONDED_AT;
|
|
@@ -52,15 +53,27 @@ export default class AnalyticsEventFactory {
|
|
|
52
53
|
sent: boolean;
|
|
53
54
|
}): AnalyticsEvent;
|
|
54
55
|
/**
|
|
55
|
-
* A
|
|
56
|
-
*
|
|
56
|
+
* A migration that did not finish. `reason` separates a deliberate abort — a newer migration
|
|
57
|
+
* owns the peer — from a genuine failure, which nothing retries.
|
|
58
|
+
*/
|
|
59
|
+
static sfuMigrationIncomplete({ reason, sfuNodeId, transportState, error, }: {
|
|
60
|
+
reason: 'superseded' | 'failed';
|
|
61
|
+
sfuNodeId?: string;
|
|
62
|
+
transportState: string;
|
|
63
|
+
error?: HMSException;
|
|
64
|
+
}): AnalyticsEvent;
|
|
65
|
+
/**
|
|
66
|
+
* A publish answer was dropped because the offer it answers is no longer staged, or the waiter
|
|
67
|
+
* for it was settled without one. `action` names the owner that must re-drive; `reason`
|
|
68
|
+
* separates the five causes. The two waiter-level ones have no offer in flight, so they carry
|
|
69
|
+
* no `epoch`/`signaling_state`.
|
|
57
70
|
*/
|
|
58
71
|
static publishAnswerDiscarded(properties: {
|
|
59
|
-
reason:
|
|
72
|
+
reason: PublishAnswerDiscardReason;
|
|
60
73
|
action: string;
|
|
61
|
-
signaling_state
|
|
74
|
+
signaling_state?: RTCSignalingState;
|
|
62
75
|
transport_state: string;
|
|
63
|
-
epoch
|
|
76
|
+
epoch?: number;
|
|
64
77
|
}): AnalyticsEvent;
|
|
65
78
|
/** no attempt was answered, so the SFU is left on a state nobody asked for */
|
|
66
79
|
static subscribeRequestUnanswered(properties: {
|
|
@@ -22,7 +22,7 @@ export default abstract class HMSConnection {
|
|
|
22
22
|
readonly candidates: RTCIceCandidateInit[];
|
|
23
23
|
sfuNodeId?: string;
|
|
24
24
|
selectedCandidatePair?: RTCIceCandidatePair;
|
|
25
|
-
/** Monotonic id of the local description
|
|
25
|
+
/** Monotonic id of the most recently requested local description (bumped on entry, not on apply). */
|
|
26
26
|
private localDescriptionEpoch;
|
|
27
27
|
protected constructor(role: HMSConnectionRole, signal: JsonRpcSignal);
|
|
28
28
|
get iceConnectionState(): RTCIceConnectionState;
|
|
@@ -31,6 +31,8 @@ export default abstract class HMSConnection {
|
|
|
31
31
|
private get action();
|
|
32
32
|
setSfuNodeId(nodeId?: string): void;
|
|
33
33
|
addTransceiver(track: MediaStreamTrack, init: RTCRtpTransceiverInit): RTCRtpTransceiver;
|
|
34
|
+
/** True when the transceiver is still attached to this connection. */
|
|
35
|
+
hasTransceiver(transceiver?: RTCRtpTransceiver): boolean;
|
|
34
36
|
createOffer(tracks?: Map<string, TrackState>, options?: RTCOfferOptions): Promise<RTCSessionDescriptionInit>;
|
|
35
37
|
createAnswer(options?: RTCOfferOptions | undefined): Promise<RTCSessionDescriptionInit>;
|
|
36
38
|
/** True while `epoch` is still the newest local description staged on this connection. */
|
|
@@ -41,6 +43,11 @@ export default abstract class HMSConnection {
|
|
|
41
43
|
*/
|
|
42
44
|
setLocalDescription(description: RTCSessionDescriptionInit): Promise<number>;
|
|
43
45
|
setRemoteDescription(description: RTCSessionDescriptionInit): Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* Applies the answer, then flushes the candidates onTrickle buffered before any remote
|
|
48
|
+
* description. Gated on this being the first answer; after it onTrickle adds directly.
|
|
49
|
+
*/
|
|
50
|
+
setRemoteDescriptionAndDrainCandidates(description: RTCSessionDescriptionInit): Promise<void>;
|
|
44
51
|
addIceCandidate(candidate: RTCIceCandidateInit): Promise<void>;
|
|
45
52
|
get remoteDescription(): RTCSessionDescription | null;
|
|
46
53
|
getSenders(): Array<RTCRtpSender>;
|