@100mslive/hms-video-store 0.14.7 → 0.14.8-alpha.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/dist/connection/subscribe/subscribeConnection.d.ts +5 -0
- package/dist/index.cjs.js +14 -14
- package/dist/index.cjs.js.map +3 -3
- package/dist/index.js +13 -13
- package/dist/index.js.map +3 -3
- package/dist/interfaces/room.d.ts +1 -1
- package/dist/interfaces/webrtc-stats.d.ts +40 -4
- package/dist/rtc-stats/utils.d.ts +9 -4
- package/dist/sdk/models/HMSRoom.d.ts +17 -1
- package/dist/webrtc-stats/selectors.d.ts +2 -0
- package/package.json +2 -2
|
@@ -35,7 +35,7 @@ export interface HMSRoom {
|
|
|
35
35
|
isVBEnabled?: boolean;
|
|
36
36
|
effectsKey?: string;
|
|
37
37
|
isHipaaEnabled?: boolean;
|
|
38
|
-
isNoiseCancellationEnabled?: boolean;
|
|
38
|
+
readonly isNoiseCancellationEnabled?: boolean;
|
|
39
39
|
transcriptions?: HMSTranscriptionInfo[];
|
|
40
40
|
}
|
|
41
41
|
export interface HMSRecording {
|
|
@@ -117,9 +117,46 @@ export interface HMSRemoteTrackStats extends BaseTrackStats, MissingInboundStats
|
|
|
117
117
|
}
|
|
118
118
|
export interface HMSTrackStats extends HMSLocalTrackStats, HMSRemoteTrackStats {
|
|
119
119
|
}
|
|
120
|
+
/**
|
|
121
|
+
* `RTCIceCandidateStats` is absent from TS's DOM lib, and `relayProtocol`/`networkType`/`url`
|
|
122
|
+
* are reported by browsers but not typed anywhere.
|
|
123
|
+
* Ref: https://www.w3.org/TR/webrtc-stats/#icecandidate-dict*
|
|
124
|
+
*/
|
|
125
|
+
export interface HMSIceCandidateStats extends RTCStats {
|
|
126
|
+
transportId?: string;
|
|
127
|
+
address?: string;
|
|
128
|
+
port?: number;
|
|
129
|
+
protocol?: IceProtocol;
|
|
130
|
+
candidateType?: RTCIceCandidateType;
|
|
131
|
+
priority?: number;
|
|
132
|
+
url?: string;
|
|
133
|
+
/**
|
|
134
|
+
* Transport used to reach the TURN server. Only set on candidates obtained through a relay,
|
|
135
|
+
* which makes it — not `candidateType` — the proof that a path is relayed: a candidate can
|
|
136
|
+
* carry `relayProtocol` while its `candidateType` is `prflx`, when the peer-reflexive address
|
|
137
|
+
* was learnt over the relay.
|
|
138
|
+
*/
|
|
139
|
+
relayProtocol?: IceProtocol | 'tls';
|
|
140
|
+
networkType?: string;
|
|
141
|
+
}
|
|
142
|
+
declare type IceProtocol = 'udp' | 'tcp';
|
|
143
|
+
/**
|
|
144
|
+
* How the local peer is actually reaching the SFU: a direct path (`host`/`srflx`/`prflx`) or
|
|
145
|
+
* a TURN relay, with the transport used to reach the TURN server.
|
|
146
|
+
*/
|
|
147
|
+
export declare type HMSConnectionType = RTCIceCandidateType | `relay(${IceProtocol | 'tls'})`;
|
|
148
|
+
/**
|
|
149
|
+
* The active ICE candidate pair of a peer connection, along with the two candidates it points
|
|
150
|
+
* at — resolved from `localCandidateId`/`remoteCandidateId` against the same stats report, since
|
|
151
|
+
* those ids are only meaningful within the report they came from.
|
|
152
|
+
*/
|
|
153
|
+
export declare type HMSConnectionStats = RTCIceCandidatePairStats & {
|
|
154
|
+
bitrate: number;
|
|
155
|
+
localCandidate?: HMSIceCandidateStats;
|
|
156
|
+
remoteCandidate?: HMSIceCandidateStats;
|
|
157
|
+
};
|
|
120
158
|
export interface HMSPeerStats {
|
|
121
|
-
publish?:
|
|
122
|
-
bitrate: number;
|
|
159
|
+
publish?: HMSConnectionStats & {
|
|
123
160
|
/**
|
|
124
161
|
* Sum of `bytesSent` across active outbound-rtp streams at the time the stat was taken.
|
|
125
162
|
* Used internally to derive `bitrate` on the next sample so the value only reflects
|
|
@@ -127,8 +164,7 @@ export interface HMSPeerStats {
|
|
|
127
164
|
*/
|
|
128
165
|
outboundRtpBytesSent?: number;
|
|
129
166
|
};
|
|
130
|
-
subscribe?:
|
|
131
|
-
bitrate: number;
|
|
167
|
+
subscribe?: HMSConnectionStats & {
|
|
132
168
|
packetsLost: number;
|
|
133
169
|
packetsLostRate: number;
|
|
134
170
|
jitter: number;
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { EventBus } from '../events/EventBus';
|
|
2
|
-
import { HMSPeerStats, HMSTrackStats, PeerConnectionType } from '../interfaces/webrtc-stats';
|
|
2
|
+
import { HMSConnectionStats, HMSConnectionType, HMSIceCandidateStats, HMSPeerStats, HMSTrackStats, PeerConnectionType } from '../interfaces/webrtc-stats';
|
|
3
3
|
import { HMSLocalTrack, HMSRemoteTrack } from '../media/tracks';
|
|
4
4
|
export declare const getLocalTrackStats: (eventBus: EventBus, track: HMSLocalTrack, peerName?: string, prevTrackStats?: Record<string, HMSTrackStats>) => Promise<Record<string, HMSTrackStats> | undefined>;
|
|
5
5
|
export declare const getTrackStats: (eventBus: EventBus, track: HMSRemoteTrack, peerName?: string, prevTrackStats?: HMSTrackStats) => Promise<HMSTrackStats | undefined>;
|
|
6
6
|
export declare const sumOutboundRtpBytesSent: (report?: RTCStatsReport) => number;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Whether the connection runs over a TURN relay (and over which transport) or directly.
|
|
9
|
+
*/
|
|
10
|
+
export declare const getConnectionType: (stats?: {
|
|
11
|
+
localCandidate?: HMSIceCandidateStats;
|
|
12
|
+
}) => HMSConnectionType | undefined;
|
|
13
|
+
export declare const getLocalPeerStatsFromReport: (type: PeerConnectionType, report?: RTCStatsReport, prevStats?: HMSPeerStats) => (HMSConnectionStats & {
|
|
14
|
+
outboundRtpBytesSent?: number;
|
|
10
15
|
}) | undefined;
|
|
11
16
|
export declare const getActiveCandidatePairFromReport: (report?: RTCStatsReport) => RTCIceCandidatePairStats | undefined;
|
|
12
17
|
export declare const getPacketsLostAndJitterFromReport: (report?: RTCStatsReport) => {
|
|
@@ -19,10 +19,26 @@ export default class Room implements HMSRoom {
|
|
|
19
19
|
isVBEnabled?: boolean;
|
|
20
20
|
effectsKey?: string;
|
|
21
21
|
isHipaaEnabled?: boolean;
|
|
22
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Raw `noiseCancellation` feature flag from /init. Written only by HMSTransport
|
|
24
|
+
* on every connect, including reconnects. Never AND it here — see the derived
|
|
25
|
+
* getter below.
|
|
26
|
+
*/
|
|
27
|
+
isNoiseCancellationEnabledFromInit: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* The template policy's `noiseCancellation.enabled`. Written only by Store when
|
|
30
|
+
* policy arrives. Absent policy key means not configured, which means false.
|
|
31
|
+
*/
|
|
32
|
+
isNoiseCancellationEnabledFromPolicy: boolean;
|
|
23
33
|
translationConfig?: Record<HMSTranscriptionMode, {
|
|
24
34
|
enabled: boolean;
|
|
25
35
|
roleLanguages?: Record<string, string>;
|
|
26
36
|
}>;
|
|
37
|
+
/**
|
|
38
|
+
* Noise cancellation is available only when the account's feature flag and the
|
|
39
|
+
* template policy both allow it. Derived, never stored, so that a reconnect
|
|
40
|
+
* re-writing the init flag cannot clobber the template's decision.
|
|
41
|
+
*/
|
|
42
|
+
get isNoiseCancellationEnabled(): boolean;
|
|
27
43
|
constructor(id: string);
|
|
28
44
|
}
|
|
@@ -8,6 +8,8 @@ export declare const selectHMSStats: {
|
|
|
8
8
|
subscribeBitrate: import("reselect").OutputSelector<HMSStatsStore, number | undefined, (res: import("../internal").HMSPeerStats | undefined) => number | undefined>;
|
|
9
9
|
availablePublishBitrate: import("reselect").OutputSelector<HMSStatsStore, number | undefined, (res: import("../internal").HMSPeerStats | undefined) => number | undefined>;
|
|
10
10
|
availableSubscribeBitrate: import("reselect").OutputSelector<HMSStatsStore, number | undefined, (res: import("../internal").HMSPeerStats | undefined) => number | undefined>;
|
|
11
|
+
publishConnectionType: import("reselect").OutputSelector<HMSStatsStore, import("../internal").HMSConnectionType | undefined, (res: import("../internal").HMSPeerStats | undefined) => import("../internal").HMSConnectionType | undefined>;
|
|
12
|
+
subscribeConnectionType: import("reselect").OutputSelector<HMSStatsStore, import("../internal").HMSConnectionType | undefined, (res: import("../internal").HMSPeerStats | undefined) => import("../internal").HMSConnectionType | undefined>;
|
|
11
13
|
totalBytesSent: import("reselect").OutputSelector<HMSStatsStore, number | undefined, (res: import("../internal").HMSPeerStats | undefined) => number | undefined>;
|
|
12
14
|
totalBytesReceived: import("reselect").OutputSelector<HMSStatsStore, number | undefined, (res: import("../internal").HMSPeerStats | undefined) => number | undefined>;
|
|
13
15
|
peerStatsByID: (id?: string | undefined) => import("../selectors/common").StoreSelector<HMSStatsStore, import("../internal").HMSPeerStats | undefined>;
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.14.
|
|
2
|
+
"version": "0.14.8-alpha.0",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"conferencing",
|
|
73
73
|
"100ms"
|
|
74
74
|
],
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "a74b883e772f7992107f8c34b5a205b1ecfdd378"
|
|
76
76
|
}
|