@whereby.com/media 1.17.3 → 1.17.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/index.cjs +318 -262
- package/dist/index.d.cts +84 -9
- package/dist/index.d.mts +84 -9
- package/dist/index.d.ts +84 -9
- package/dist/index.mjs +316 -263
- package/dist/legacy-esm.js +316 -263
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -101,29 +101,104 @@ declare class Logger {
|
|
|
101
101
|
debug(...params: any[]): void;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
interface PressureObserver {
|
|
105
|
+
observe: (source: string, options: {
|
|
106
|
+
sampleInterval: number;
|
|
107
|
+
}) => Promise<undefined>;
|
|
108
|
+
unobserve: (source: string) => undefined;
|
|
109
|
+
}
|
|
110
|
+
type PressureRecord = {
|
|
111
|
+
source: string;
|
|
112
|
+
state: string;
|
|
113
|
+
time: number;
|
|
114
|
+
};
|
|
115
|
+
|
|
104
116
|
interface StatsMonitor {
|
|
105
|
-
getUpdatedStats: () =>
|
|
117
|
+
getUpdatedStats: () => Promise<Record<string, ViewStats> | undefined>;
|
|
106
118
|
stop: () => void;
|
|
107
119
|
}
|
|
108
120
|
interface StatsSubscription {
|
|
109
|
-
onUpdatedStats: (statsByView:
|
|
121
|
+
onUpdatedStats: (statsByView: Record<string, ViewStats>, clients: any) => void;
|
|
110
122
|
}
|
|
111
123
|
interface StatsMonitorState {
|
|
112
124
|
currentMonitor: StatsMonitor | null;
|
|
113
125
|
getClients: () => any[];
|
|
114
|
-
lastPressureObserverRecord?:
|
|
126
|
+
lastPressureObserverRecord?: PressureRecord;
|
|
115
127
|
lastUpdateTime: number;
|
|
116
|
-
nextTimeout?:
|
|
117
|
-
pressureObserver?:
|
|
118
|
-
statsByView:
|
|
128
|
+
nextTimeout?: number;
|
|
129
|
+
pressureObserver?: PressureObserver;
|
|
130
|
+
statsByView: Record<string, ViewStats>;
|
|
119
131
|
subscriptions: StatsSubscription[];
|
|
132
|
+
numFailedStatsReports: number;
|
|
120
133
|
}
|
|
121
134
|
interface StatsMonitorOptions {
|
|
122
135
|
interval: number;
|
|
123
136
|
logger: Pick<Logger, "debug" | "error" | "info" | "warn">;
|
|
124
137
|
}
|
|
125
|
-
|
|
126
|
-
|
|
138
|
+
interface TrackStats {
|
|
139
|
+
startTime: number;
|
|
140
|
+
updated: number;
|
|
141
|
+
ssrcs: Record<number, ssrcStats>;
|
|
142
|
+
}
|
|
143
|
+
interface ViewStats {
|
|
144
|
+
startTime?: number;
|
|
145
|
+
updated?: number;
|
|
146
|
+
pressure?: PressureRecord | null;
|
|
147
|
+
candidatePairs?: any;
|
|
148
|
+
tracks: Record<string, TrackStats>;
|
|
149
|
+
}
|
|
150
|
+
interface ssrcStats {
|
|
151
|
+
startTime: number;
|
|
152
|
+
updated: number;
|
|
153
|
+
pcIndex: number;
|
|
154
|
+
direction?: string;
|
|
155
|
+
bitrate?: number;
|
|
156
|
+
fractionLost?: number;
|
|
157
|
+
height?: number;
|
|
158
|
+
lossRatio?: number;
|
|
159
|
+
pliRate?: number;
|
|
160
|
+
fps?: number;
|
|
161
|
+
audioLevel?: number;
|
|
162
|
+
audioConcealment?: number;
|
|
163
|
+
audioDeceleration?: number;
|
|
164
|
+
audioAcceleration?: number;
|
|
165
|
+
sourceHeight?: number;
|
|
166
|
+
jitter?: number;
|
|
167
|
+
roundTripTime?: number;
|
|
168
|
+
codec?: string;
|
|
169
|
+
byteCount?: number;
|
|
170
|
+
kind?: string;
|
|
171
|
+
ssrc?: number;
|
|
172
|
+
mid?: number;
|
|
173
|
+
rid?: string;
|
|
174
|
+
nackCount?: number;
|
|
175
|
+
nackRate?: number;
|
|
176
|
+
packetCount?: number;
|
|
177
|
+
packetRate?: number;
|
|
178
|
+
headerByteCount?: number;
|
|
179
|
+
mediaRatio?: number;
|
|
180
|
+
sendDelay?: number;
|
|
181
|
+
retransRatio?: number;
|
|
182
|
+
width?: number;
|
|
183
|
+
qualityLimitationReason?: string;
|
|
184
|
+
pliCount?: number;
|
|
185
|
+
firCount?: number;
|
|
186
|
+
firRate?: number;
|
|
187
|
+
kfCount?: number;
|
|
188
|
+
kfRate?: number;
|
|
189
|
+
frameCount?: number;
|
|
190
|
+
qpf?: number;
|
|
191
|
+
encodeTime?: number;
|
|
192
|
+
sourceWidth?: number;
|
|
193
|
+
sourceFps?: number;
|
|
194
|
+
}
|
|
195
|
+
declare const getStats: () => {
|
|
196
|
+
[x: string]: ViewStats;
|
|
197
|
+
};
|
|
198
|
+
declare const getNumFailedStatsReports: () => number;
|
|
199
|
+
declare const getNumMissingTrackSsrcLookups: () => number;
|
|
200
|
+
declare const getNumFailedTrackSsrcLookups: () => number;
|
|
201
|
+
declare const getUpdatedStats: () => Promise<Record<string, ViewStats> | undefined> | undefined;
|
|
127
202
|
declare const setClientProvider: (provider: any) => any;
|
|
128
203
|
declare function subscribeStats(subscription: StatsSubscription, options?: StatsMonitorOptions, state?: StatsMonitorState): {
|
|
129
204
|
stop(): void;
|
|
@@ -1507,4 +1582,4 @@ declare class RtcStream {
|
|
|
1507
1582
|
static getTypeFromId(id: string): string;
|
|
1508
1583
|
}
|
|
1509
1584
|
|
|
1510
|
-
export { type AddSpotlightRequest, type AudioEnableRequest, type AudioEnableRequestedEvent, type AudioEnabledEvent, BandwidthTester, type BreakoutGroupJoinedEvent, type ChatMessage, type ClientKickedEvent, type ClientLeftEvent, type ClientMetadataPayload, type ClientMetadataReceivedEvent, type ClientRole, type ClientUnableToJoinEvent, type CloudRecordingStartedEvent, type Credentials, type CustomMediaStreamTrack, EVENTS, type GetConstraintsOptions, type GetDeviceDataResult, type GetMediaConstraintsOptions, type GetStreamOptions, type GetStreamResult, type GetUpdatedDevicesResult, type IdentifyDeviceRequest, type IssuesAndMetricsByView, type JoinRoomRequest, KNOCK_MESSAGES, KalmanFilter, type KnockAcceptedEvent, type KnockRejectedEvent, type KnockRoomRequest, type KnockerLeftEvent, type LiveTranscriptionStartedEvent, type LiveTranscriptionStoppedEvent, Logger, MAXIMUM_TURN_BANDWIDTH, MAXIMUM_TURN_BANDWIDTH_UNLIMITED, MEDIA_JITTER_BUFFER_TARGET, type NewClientEvent, NoDevicesError, P2pRtcManager, PROTOCOL_ERRORS, PROTOCOL_EVENTS, PROTOCOL_REQUESTS, PROTOCOL_RESPONSES, RELAY_MESSAGES, ReconnectManager, type RemoveSpotlightRequest, type RoleName, type RoomJoinedEvent, type RoomKnockedEvent, type RoomLockedEvent, type RoomSessionEndedEvent, type RtcClientConnectionStatusChangedPayload, RtcEventNames, type RtcEvents, type RtcLocalStreamTrackAddedPayload, type RtcLocalStreamTrackRemovedPayload, type RtcManager, type RtcManagerCreatedPayload, RtcManagerDispatcher, RtcStream, type RtcStreamAddedPayload, STREAM_TYPES, type ScreenshareStartedEvent, type ScreenshareStoppedEvent, type SendClientMetadataRequest, ServerSocket, Session, SfuV2Parser, type SignalClient, type SignalEvents, type SignalKnocker, type SignalRequests, type SocketConf, type SocketManager, type Spotlight, type SpotlightAddedEvent, type SpotlightRemovedEvent, type StatsMonitorOptions, type StatsMonitorState, TYPES, type TurnTransportProtocol, VegaConnection, VegaMediaQualityMonitor, VegaRtcManager, type VideoEnableRequest, type VideoEnableRequestedEvent, type VideoEnabledEvent, addAbsCaptureTimeExtMap, addExtMap, assert, buildDeviceList, calculateStd, captureAudioSsrcMetrics, captureCandidatePairInfoMetrics, captureCommonSsrcMetrics, captureSsrcInfo, captureVideoSsrcMetrics, changeMediaDirection, cleanSdp, compareLocalDevices, createACFCalculator, createMicAnalyser, createWorker, deprioritizeH264, detectMicrophoneNotWorking, enumerate, filterMidExtension, filterMsidSemantic, fromLocation, generateByteString, getConstraints, getCurrentPeerConnections, getDeviceData, getDisplayMedia, getHandler, getIssuesAndMetrics, getMediaConstraints, getMediaSettings, getOptimalBitrate, getPeerConnectionIndex, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isMobile, isRelayed, maybeRejectNoH264, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceSSRCs, replaceTracksInStream, _default as rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, variance };
|
|
1585
|
+
export { type AddSpotlightRequest, type AudioEnableRequest, type AudioEnableRequestedEvent, type AudioEnabledEvent, BandwidthTester, type BreakoutGroupJoinedEvent, type ChatMessage, type ClientKickedEvent, type ClientLeftEvent, type ClientMetadataPayload, type ClientMetadataReceivedEvent, type ClientRole, type ClientUnableToJoinEvent, type CloudRecordingStartedEvent, type Credentials, type CustomMediaStreamTrack, EVENTS, type GetConstraintsOptions, type GetDeviceDataResult, type GetMediaConstraintsOptions, type GetStreamOptions, type GetStreamResult, type GetUpdatedDevicesResult, type IdentifyDeviceRequest, type IssuesAndMetricsByView, type JoinRoomRequest, KNOCK_MESSAGES, KalmanFilter, type KnockAcceptedEvent, type KnockRejectedEvent, type KnockRoomRequest, type KnockerLeftEvent, type LiveTranscriptionStartedEvent, type LiveTranscriptionStoppedEvent, Logger, MAXIMUM_TURN_BANDWIDTH, MAXIMUM_TURN_BANDWIDTH_UNLIMITED, MEDIA_JITTER_BUFFER_TARGET, type NewClientEvent, NoDevicesError, P2pRtcManager, PROTOCOL_ERRORS, PROTOCOL_EVENTS, PROTOCOL_REQUESTS, PROTOCOL_RESPONSES, RELAY_MESSAGES, ReconnectManager, type RemoveSpotlightRequest, type RoleName, type RoomJoinedEvent, type RoomKnockedEvent, type RoomLockedEvent, type RoomSessionEndedEvent, type RtcClientConnectionStatusChangedPayload, RtcEventNames, type RtcEvents, type RtcLocalStreamTrackAddedPayload, type RtcLocalStreamTrackRemovedPayload, type RtcManager, type RtcManagerCreatedPayload, RtcManagerDispatcher, RtcStream, type RtcStreamAddedPayload, STREAM_TYPES, type ScreenshareStartedEvent, type ScreenshareStoppedEvent, type SendClientMetadataRequest, ServerSocket, Session, SfuV2Parser, type SignalClient, type SignalEvents, type SignalKnocker, type SignalRequests, type SocketConf, type SocketManager, type Spotlight, type SpotlightAddedEvent, type SpotlightRemovedEvent, type StatsMonitorOptions, type StatsMonitorState, type StatsSubscription, TYPES, type TrackStats, type TurnTransportProtocol, VegaConnection, VegaMediaQualityMonitor, VegaRtcManager, type VideoEnableRequest, type VideoEnableRequestedEvent, type VideoEnabledEvent, type ViewStats, addAbsCaptureTimeExtMap, addExtMap, assert, buildDeviceList, calculateStd, captureAudioSsrcMetrics, captureCandidatePairInfoMetrics, captureCommonSsrcMetrics, captureSsrcInfo, captureVideoSsrcMetrics, changeMediaDirection, cleanSdp, compareLocalDevices, createACFCalculator, createMicAnalyser, createWorker, deprioritizeH264, detectMicrophoneNotWorking, enumerate, filterMidExtension, filterMsidSemantic, fromLocation, generateByteString, getConstraints, getCurrentPeerConnections, getDeviceData, getDisplayMedia, getHandler, getIssuesAndMetrics, getMediaConstraints, getMediaSettings, getNumFailedStatsReports, getNumFailedTrackSsrcLookups, getNumMissingTrackSsrcLookups, getOptimalBitrate, getPeerConnectionIndex, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isMobile, isRelayed, maybeRejectNoH264, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceSSRCs, replaceTracksInStream, _default as rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, type ssrcStats, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, variance };
|
package/dist/index.d.mts
CHANGED
|
@@ -101,29 +101,104 @@ declare class Logger {
|
|
|
101
101
|
debug(...params: any[]): void;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
interface PressureObserver {
|
|
105
|
+
observe: (source: string, options: {
|
|
106
|
+
sampleInterval: number;
|
|
107
|
+
}) => Promise<undefined>;
|
|
108
|
+
unobserve: (source: string) => undefined;
|
|
109
|
+
}
|
|
110
|
+
type PressureRecord = {
|
|
111
|
+
source: string;
|
|
112
|
+
state: string;
|
|
113
|
+
time: number;
|
|
114
|
+
};
|
|
115
|
+
|
|
104
116
|
interface StatsMonitor {
|
|
105
|
-
getUpdatedStats: () =>
|
|
117
|
+
getUpdatedStats: () => Promise<Record<string, ViewStats> | undefined>;
|
|
106
118
|
stop: () => void;
|
|
107
119
|
}
|
|
108
120
|
interface StatsSubscription {
|
|
109
|
-
onUpdatedStats: (statsByView:
|
|
121
|
+
onUpdatedStats: (statsByView: Record<string, ViewStats>, clients: any) => void;
|
|
110
122
|
}
|
|
111
123
|
interface StatsMonitorState {
|
|
112
124
|
currentMonitor: StatsMonitor | null;
|
|
113
125
|
getClients: () => any[];
|
|
114
|
-
lastPressureObserverRecord?:
|
|
126
|
+
lastPressureObserverRecord?: PressureRecord;
|
|
115
127
|
lastUpdateTime: number;
|
|
116
|
-
nextTimeout?:
|
|
117
|
-
pressureObserver?:
|
|
118
|
-
statsByView:
|
|
128
|
+
nextTimeout?: number;
|
|
129
|
+
pressureObserver?: PressureObserver;
|
|
130
|
+
statsByView: Record<string, ViewStats>;
|
|
119
131
|
subscriptions: StatsSubscription[];
|
|
132
|
+
numFailedStatsReports: number;
|
|
120
133
|
}
|
|
121
134
|
interface StatsMonitorOptions {
|
|
122
135
|
interval: number;
|
|
123
136
|
logger: Pick<Logger, "debug" | "error" | "info" | "warn">;
|
|
124
137
|
}
|
|
125
|
-
|
|
126
|
-
|
|
138
|
+
interface TrackStats {
|
|
139
|
+
startTime: number;
|
|
140
|
+
updated: number;
|
|
141
|
+
ssrcs: Record<number, ssrcStats>;
|
|
142
|
+
}
|
|
143
|
+
interface ViewStats {
|
|
144
|
+
startTime?: number;
|
|
145
|
+
updated?: number;
|
|
146
|
+
pressure?: PressureRecord | null;
|
|
147
|
+
candidatePairs?: any;
|
|
148
|
+
tracks: Record<string, TrackStats>;
|
|
149
|
+
}
|
|
150
|
+
interface ssrcStats {
|
|
151
|
+
startTime: number;
|
|
152
|
+
updated: number;
|
|
153
|
+
pcIndex: number;
|
|
154
|
+
direction?: string;
|
|
155
|
+
bitrate?: number;
|
|
156
|
+
fractionLost?: number;
|
|
157
|
+
height?: number;
|
|
158
|
+
lossRatio?: number;
|
|
159
|
+
pliRate?: number;
|
|
160
|
+
fps?: number;
|
|
161
|
+
audioLevel?: number;
|
|
162
|
+
audioConcealment?: number;
|
|
163
|
+
audioDeceleration?: number;
|
|
164
|
+
audioAcceleration?: number;
|
|
165
|
+
sourceHeight?: number;
|
|
166
|
+
jitter?: number;
|
|
167
|
+
roundTripTime?: number;
|
|
168
|
+
codec?: string;
|
|
169
|
+
byteCount?: number;
|
|
170
|
+
kind?: string;
|
|
171
|
+
ssrc?: number;
|
|
172
|
+
mid?: number;
|
|
173
|
+
rid?: string;
|
|
174
|
+
nackCount?: number;
|
|
175
|
+
nackRate?: number;
|
|
176
|
+
packetCount?: number;
|
|
177
|
+
packetRate?: number;
|
|
178
|
+
headerByteCount?: number;
|
|
179
|
+
mediaRatio?: number;
|
|
180
|
+
sendDelay?: number;
|
|
181
|
+
retransRatio?: number;
|
|
182
|
+
width?: number;
|
|
183
|
+
qualityLimitationReason?: string;
|
|
184
|
+
pliCount?: number;
|
|
185
|
+
firCount?: number;
|
|
186
|
+
firRate?: number;
|
|
187
|
+
kfCount?: number;
|
|
188
|
+
kfRate?: number;
|
|
189
|
+
frameCount?: number;
|
|
190
|
+
qpf?: number;
|
|
191
|
+
encodeTime?: number;
|
|
192
|
+
sourceWidth?: number;
|
|
193
|
+
sourceFps?: number;
|
|
194
|
+
}
|
|
195
|
+
declare const getStats: () => {
|
|
196
|
+
[x: string]: ViewStats;
|
|
197
|
+
};
|
|
198
|
+
declare const getNumFailedStatsReports: () => number;
|
|
199
|
+
declare const getNumMissingTrackSsrcLookups: () => number;
|
|
200
|
+
declare const getNumFailedTrackSsrcLookups: () => number;
|
|
201
|
+
declare const getUpdatedStats: () => Promise<Record<string, ViewStats> | undefined> | undefined;
|
|
127
202
|
declare const setClientProvider: (provider: any) => any;
|
|
128
203
|
declare function subscribeStats(subscription: StatsSubscription, options?: StatsMonitorOptions, state?: StatsMonitorState): {
|
|
129
204
|
stop(): void;
|
|
@@ -1507,4 +1582,4 @@ declare class RtcStream {
|
|
|
1507
1582
|
static getTypeFromId(id: string): string;
|
|
1508
1583
|
}
|
|
1509
1584
|
|
|
1510
|
-
export { type AddSpotlightRequest, type AudioEnableRequest, type AudioEnableRequestedEvent, type AudioEnabledEvent, BandwidthTester, type BreakoutGroupJoinedEvent, type ChatMessage, type ClientKickedEvent, type ClientLeftEvent, type ClientMetadataPayload, type ClientMetadataReceivedEvent, type ClientRole, type ClientUnableToJoinEvent, type CloudRecordingStartedEvent, type Credentials, type CustomMediaStreamTrack, EVENTS, type GetConstraintsOptions, type GetDeviceDataResult, type GetMediaConstraintsOptions, type GetStreamOptions, type GetStreamResult, type GetUpdatedDevicesResult, type IdentifyDeviceRequest, type IssuesAndMetricsByView, type JoinRoomRequest, KNOCK_MESSAGES, KalmanFilter, type KnockAcceptedEvent, type KnockRejectedEvent, type KnockRoomRequest, type KnockerLeftEvent, type LiveTranscriptionStartedEvent, type LiveTranscriptionStoppedEvent, Logger, MAXIMUM_TURN_BANDWIDTH, MAXIMUM_TURN_BANDWIDTH_UNLIMITED, MEDIA_JITTER_BUFFER_TARGET, type NewClientEvent, NoDevicesError, P2pRtcManager, PROTOCOL_ERRORS, PROTOCOL_EVENTS, PROTOCOL_REQUESTS, PROTOCOL_RESPONSES, RELAY_MESSAGES, ReconnectManager, type RemoveSpotlightRequest, type RoleName, type RoomJoinedEvent, type RoomKnockedEvent, type RoomLockedEvent, type RoomSessionEndedEvent, type RtcClientConnectionStatusChangedPayload, RtcEventNames, type RtcEvents, type RtcLocalStreamTrackAddedPayload, type RtcLocalStreamTrackRemovedPayload, type RtcManager, type RtcManagerCreatedPayload, RtcManagerDispatcher, RtcStream, type RtcStreamAddedPayload, STREAM_TYPES, type ScreenshareStartedEvent, type ScreenshareStoppedEvent, type SendClientMetadataRequest, ServerSocket, Session, SfuV2Parser, type SignalClient, type SignalEvents, type SignalKnocker, type SignalRequests, type SocketConf, type SocketManager, type Spotlight, type SpotlightAddedEvent, type SpotlightRemovedEvent, type StatsMonitorOptions, type StatsMonitorState, TYPES, type TurnTransportProtocol, VegaConnection, VegaMediaQualityMonitor, VegaRtcManager, type VideoEnableRequest, type VideoEnableRequestedEvent, type VideoEnabledEvent, addAbsCaptureTimeExtMap, addExtMap, assert, buildDeviceList, calculateStd, captureAudioSsrcMetrics, captureCandidatePairInfoMetrics, captureCommonSsrcMetrics, captureSsrcInfo, captureVideoSsrcMetrics, changeMediaDirection, cleanSdp, compareLocalDevices, createACFCalculator, createMicAnalyser, createWorker, deprioritizeH264, detectMicrophoneNotWorking, enumerate, filterMidExtension, filterMsidSemantic, fromLocation, generateByteString, getConstraints, getCurrentPeerConnections, getDeviceData, getDisplayMedia, getHandler, getIssuesAndMetrics, getMediaConstraints, getMediaSettings, getOptimalBitrate, getPeerConnectionIndex, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isMobile, isRelayed, maybeRejectNoH264, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceSSRCs, replaceTracksInStream, _default as rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, variance };
|
|
1585
|
+
export { type AddSpotlightRequest, type AudioEnableRequest, type AudioEnableRequestedEvent, type AudioEnabledEvent, BandwidthTester, type BreakoutGroupJoinedEvent, type ChatMessage, type ClientKickedEvent, type ClientLeftEvent, type ClientMetadataPayload, type ClientMetadataReceivedEvent, type ClientRole, type ClientUnableToJoinEvent, type CloudRecordingStartedEvent, type Credentials, type CustomMediaStreamTrack, EVENTS, type GetConstraintsOptions, type GetDeviceDataResult, type GetMediaConstraintsOptions, type GetStreamOptions, type GetStreamResult, type GetUpdatedDevicesResult, type IdentifyDeviceRequest, type IssuesAndMetricsByView, type JoinRoomRequest, KNOCK_MESSAGES, KalmanFilter, type KnockAcceptedEvent, type KnockRejectedEvent, type KnockRoomRequest, type KnockerLeftEvent, type LiveTranscriptionStartedEvent, type LiveTranscriptionStoppedEvent, Logger, MAXIMUM_TURN_BANDWIDTH, MAXIMUM_TURN_BANDWIDTH_UNLIMITED, MEDIA_JITTER_BUFFER_TARGET, type NewClientEvent, NoDevicesError, P2pRtcManager, PROTOCOL_ERRORS, PROTOCOL_EVENTS, PROTOCOL_REQUESTS, PROTOCOL_RESPONSES, RELAY_MESSAGES, ReconnectManager, type RemoveSpotlightRequest, type RoleName, type RoomJoinedEvent, type RoomKnockedEvent, type RoomLockedEvent, type RoomSessionEndedEvent, type RtcClientConnectionStatusChangedPayload, RtcEventNames, type RtcEvents, type RtcLocalStreamTrackAddedPayload, type RtcLocalStreamTrackRemovedPayload, type RtcManager, type RtcManagerCreatedPayload, RtcManagerDispatcher, RtcStream, type RtcStreamAddedPayload, STREAM_TYPES, type ScreenshareStartedEvent, type ScreenshareStoppedEvent, type SendClientMetadataRequest, ServerSocket, Session, SfuV2Parser, type SignalClient, type SignalEvents, type SignalKnocker, type SignalRequests, type SocketConf, type SocketManager, type Spotlight, type SpotlightAddedEvent, type SpotlightRemovedEvent, type StatsMonitorOptions, type StatsMonitorState, type StatsSubscription, TYPES, type TrackStats, type TurnTransportProtocol, VegaConnection, VegaMediaQualityMonitor, VegaRtcManager, type VideoEnableRequest, type VideoEnableRequestedEvent, type VideoEnabledEvent, type ViewStats, addAbsCaptureTimeExtMap, addExtMap, assert, buildDeviceList, calculateStd, captureAudioSsrcMetrics, captureCandidatePairInfoMetrics, captureCommonSsrcMetrics, captureSsrcInfo, captureVideoSsrcMetrics, changeMediaDirection, cleanSdp, compareLocalDevices, createACFCalculator, createMicAnalyser, createWorker, deprioritizeH264, detectMicrophoneNotWorking, enumerate, filterMidExtension, filterMsidSemantic, fromLocation, generateByteString, getConstraints, getCurrentPeerConnections, getDeviceData, getDisplayMedia, getHandler, getIssuesAndMetrics, getMediaConstraints, getMediaSettings, getNumFailedStatsReports, getNumFailedTrackSsrcLookups, getNumMissingTrackSsrcLookups, getOptimalBitrate, getPeerConnectionIndex, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isMobile, isRelayed, maybeRejectNoH264, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceSSRCs, replaceTracksInStream, _default as rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, type ssrcStats, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, variance };
|
package/dist/index.d.ts
CHANGED
|
@@ -101,29 +101,104 @@ declare class Logger {
|
|
|
101
101
|
debug(...params: any[]): void;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
interface PressureObserver {
|
|
105
|
+
observe: (source: string, options: {
|
|
106
|
+
sampleInterval: number;
|
|
107
|
+
}) => Promise<undefined>;
|
|
108
|
+
unobserve: (source: string) => undefined;
|
|
109
|
+
}
|
|
110
|
+
type PressureRecord = {
|
|
111
|
+
source: string;
|
|
112
|
+
state: string;
|
|
113
|
+
time: number;
|
|
114
|
+
};
|
|
115
|
+
|
|
104
116
|
interface StatsMonitor {
|
|
105
|
-
getUpdatedStats: () =>
|
|
117
|
+
getUpdatedStats: () => Promise<Record<string, ViewStats> | undefined>;
|
|
106
118
|
stop: () => void;
|
|
107
119
|
}
|
|
108
120
|
interface StatsSubscription {
|
|
109
|
-
onUpdatedStats: (statsByView:
|
|
121
|
+
onUpdatedStats: (statsByView: Record<string, ViewStats>, clients: any) => void;
|
|
110
122
|
}
|
|
111
123
|
interface StatsMonitorState {
|
|
112
124
|
currentMonitor: StatsMonitor | null;
|
|
113
125
|
getClients: () => any[];
|
|
114
|
-
lastPressureObserverRecord?:
|
|
126
|
+
lastPressureObserverRecord?: PressureRecord;
|
|
115
127
|
lastUpdateTime: number;
|
|
116
|
-
nextTimeout?:
|
|
117
|
-
pressureObserver?:
|
|
118
|
-
statsByView:
|
|
128
|
+
nextTimeout?: number;
|
|
129
|
+
pressureObserver?: PressureObserver;
|
|
130
|
+
statsByView: Record<string, ViewStats>;
|
|
119
131
|
subscriptions: StatsSubscription[];
|
|
132
|
+
numFailedStatsReports: number;
|
|
120
133
|
}
|
|
121
134
|
interface StatsMonitorOptions {
|
|
122
135
|
interval: number;
|
|
123
136
|
logger: Pick<Logger, "debug" | "error" | "info" | "warn">;
|
|
124
137
|
}
|
|
125
|
-
|
|
126
|
-
|
|
138
|
+
interface TrackStats {
|
|
139
|
+
startTime: number;
|
|
140
|
+
updated: number;
|
|
141
|
+
ssrcs: Record<number, ssrcStats>;
|
|
142
|
+
}
|
|
143
|
+
interface ViewStats {
|
|
144
|
+
startTime?: number;
|
|
145
|
+
updated?: number;
|
|
146
|
+
pressure?: PressureRecord | null;
|
|
147
|
+
candidatePairs?: any;
|
|
148
|
+
tracks: Record<string, TrackStats>;
|
|
149
|
+
}
|
|
150
|
+
interface ssrcStats {
|
|
151
|
+
startTime: number;
|
|
152
|
+
updated: number;
|
|
153
|
+
pcIndex: number;
|
|
154
|
+
direction?: string;
|
|
155
|
+
bitrate?: number;
|
|
156
|
+
fractionLost?: number;
|
|
157
|
+
height?: number;
|
|
158
|
+
lossRatio?: number;
|
|
159
|
+
pliRate?: number;
|
|
160
|
+
fps?: number;
|
|
161
|
+
audioLevel?: number;
|
|
162
|
+
audioConcealment?: number;
|
|
163
|
+
audioDeceleration?: number;
|
|
164
|
+
audioAcceleration?: number;
|
|
165
|
+
sourceHeight?: number;
|
|
166
|
+
jitter?: number;
|
|
167
|
+
roundTripTime?: number;
|
|
168
|
+
codec?: string;
|
|
169
|
+
byteCount?: number;
|
|
170
|
+
kind?: string;
|
|
171
|
+
ssrc?: number;
|
|
172
|
+
mid?: number;
|
|
173
|
+
rid?: string;
|
|
174
|
+
nackCount?: number;
|
|
175
|
+
nackRate?: number;
|
|
176
|
+
packetCount?: number;
|
|
177
|
+
packetRate?: number;
|
|
178
|
+
headerByteCount?: number;
|
|
179
|
+
mediaRatio?: number;
|
|
180
|
+
sendDelay?: number;
|
|
181
|
+
retransRatio?: number;
|
|
182
|
+
width?: number;
|
|
183
|
+
qualityLimitationReason?: string;
|
|
184
|
+
pliCount?: number;
|
|
185
|
+
firCount?: number;
|
|
186
|
+
firRate?: number;
|
|
187
|
+
kfCount?: number;
|
|
188
|
+
kfRate?: number;
|
|
189
|
+
frameCount?: number;
|
|
190
|
+
qpf?: number;
|
|
191
|
+
encodeTime?: number;
|
|
192
|
+
sourceWidth?: number;
|
|
193
|
+
sourceFps?: number;
|
|
194
|
+
}
|
|
195
|
+
declare const getStats: () => {
|
|
196
|
+
[x: string]: ViewStats;
|
|
197
|
+
};
|
|
198
|
+
declare const getNumFailedStatsReports: () => number;
|
|
199
|
+
declare const getNumMissingTrackSsrcLookups: () => number;
|
|
200
|
+
declare const getNumFailedTrackSsrcLookups: () => number;
|
|
201
|
+
declare const getUpdatedStats: () => Promise<Record<string, ViewStats> | undefined> | undefined;
|
|
127
202
|
declare const setClientProvider: (provider: any) => any;
|
|
128
203
|
declare function subscribeStats(subscription: StatsSubscription, options?: StatsMonitorOptions, state?: StatsMonitorState): {
|
|
129
204
|
stop(): void;
|
|
@@ -1507,4 +1582,4 @@ declare class RtcStream {
|
|
|
1507
1582
|
static getTypeFromId(id: string): string;
|
|
1508
1583
|
}
|
|
1509
1584
|
|
|
1510
|
-
export { type AddSpotlightRequest, type AudioEnableRequest, type AudioEnableRequestedEvent, type AudioEnabledEvent, BandwidthTester, type BreakoutGroupJoinedEvent, type ChatMessage, type ClientKickedEvent, type ClientLeftEvent, type ClientMetadataPayload, type ClientMetadataReceivedEvent, type ClientRole, type ClientUnableToJoinEvent, type CloudRecordingStartedEvent, type Credentials, type CustomMediaStreamTrack, EVENTS, type GetConstraintsOptions, type GetDeviceDataResult, type GetMediaConstraintsOptions, type GetStreamOptions, type GetStreamResult, type GetUpdatedDevicesResult, type IdentifyDeviceRequest, type IssuesAndMetricsByView, type JoinRoomRequest, KNOCK_MESSAGES, KalmanFilter, type KnockAcceptedEvent, type KnockRejectedEvent, type KnockRoomRequest, type KnockerLeftEvent, type LiveTranscriptionStartedEvent, type LiveTranscriptionStoppedEvent, Logger, MAXIMUM_TURN_BANDWIDTH, MAXIMUM_TURN_BANDWIDTH_UNLIMITED, MEDIA_JITTER_BUFFER_TARGET, type NewClientEvent, NoDevicesError, P2pRtcManager, PROTOCOL_ERRORS, PROTOCOL_EVENTS, PROTOCOL_REQUESTS, PROTOCOL_RESPONSES, RELAY_MESSAGES, ReconnectManager, type RemoveSpotlightRequest, type RoleName, type RoomJoinedEvent, type RoomKnockedEvent, type RoomLockedEvent, type RoomSessionEndedEvent, type RtcClientConnectionStatusChangedPayload, RtcEventNames, type RtcEvents, type RtcLocalStreamTrackAddedPayload, type RtcLocalStreamTrackRemovedPayload, type RtcManager, type RtcManagerCreatedPayload, RtcManagerDispatcher, RtcStream, type RtcStreamAddedPayload, STREAM_TYPES, type ScreenshareStartedEvent, type ScreenshareStoppedEvent, type SendClientMetadataRequest, ServerSocket, Session, SfuV2Parser, type SignalClient, type SignalEvents, type SignalKnocker, type SignalRequests, type SocketConf, type SocketManager, type Spotlight, type SpotlightAddedEvent, type SpotlightRemovedEvent, type StatsMonitorOptions, type StatsMonitorState, TYPES, type TurnTransportProtocol, VegaConnection, VegaMediaQualityMonitor, VegaRtcManager, type VideoEnableRequest, type VideoEnableRequestedEvent, type VideoEnabledEvent, addAbsCaptureTimeExtMap, addExtMap, assert, buildDeviceList, calculateStd, captureAudioSsrcMetrics, captureCandidatePairInfoMetrics, captureCommonSsrcMetrics, captureSsrcInfo, captureVideoSsrcMetrics, changeMediaDirection, cleanSdp, compareLocalDevices, createACFCalculator, createMicAnalyser, createWorker, deprioritizeH264, detectMicrophoneNotWorking, enumerate, filterMidExtension, filterMsidSemantic, fromLocation, generateByteString, getConstraints, getCurrentPeerConnections, getDeviceData, getDisplayMedia, getHandler, getIssuesAndMetrics, getMediaConstraints, getMediaSettings, getOptimalBitrate, getPeerConnectionIndex, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isMobile, isRelayed, maybeRejectNoH264, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceSSRCs, replaceTracksInStream, _default as rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, variance };
|
|
1585
|
+
export { type AddSpotlightRequest, type AudioEnableRequest, type AudioEnableRequestedEvent, type AudioEnabledEvent, BandwidthTester, type BreakoutGroupJoinedEvent, type ChatMessage, type ClientKickedEvent, type ClientLeftEvent, type ClientMetadataPayload, type ClientMetadataReceivedEvent, type ClientRole, type ClientUnableToJoinEvent, type CloudRecordingStartedEvent, type Credentials, type CustomMediaStreamTrack, EVENTS, type GetConstraintsOptions, type GetDeviceDataResult, type GetMediaConstraintsOptions, type GetStreamOptions, type GetStreamResult, type GetUpdatedDevicesResult, type IdentifyDeviceRequest, type IssuesAndMetricsByView, type JoinRoomRequest, KNOCK_MESSAGES, KalmanFilter, type KnockAcceptedEvent, type KnockRejectedEvent, type KnockRoomRequest, type KnockerLeftEvent, type LiveTranscriptionStartedEvent, type LiveTranscriptionStoppedEvent, Logger, MAXIMUM_TURN_BANDWIDTH, MAXIMUM_TURN_BANDWIDTH_UNLIMITED, MEDIA_JITTER_BUFFER_TARGET, type NewClientEvent, NoDevicesError, P2pRtcManager, PROTOCOL_ERRORS, PROTOCOL_EVENTS, PROTOCOL_REQUESTS, PROTOCOL_RESPONSES, RELAY_MESSAGES, ReconnectManager, type RemoveSpotlightRequest, type RoleName, type RoomJoinedEvent, type RoomKnockedEvent, type RoomLockedEvent, type RoomSessionEndedEvent, type RtcClientConnectionStatusChangedPayload, RtcEventNames, type RtcEvents, type RtcLocalStreamTrackAddedPayload, type RtcLocalStreamTrackRemovedPayload, type RtcManager, type RtcManagerCreatedPayload, RtcManagerDispatcher, RtcStream, type RtcStreamAddedPayload, STREAM_TYPES, type ScreenshareStartedEvent, type ScreenshareStoppedEvent, type SendClientMetadataRequest, ServerSocket, Session, SfuV2Parser, type SignalClient, type SignalEvents, type SignalKnocker, type SignalRequests, type SocketConf, type SocketManager, type Spotlight, type SpotlightAddedEvent, type SpotlightRemovedEvent, type StatsMonitorOptions, type StatsMonitorState, type StatsSubscription, TYPES, type TrackStats, type TurnTransportProtocol, VegaConnection, VegaMediaQualityMonitor, VegaRtcManager, type VideoEnableRequest, type VideoEnableRequestedEvent, type VideoEnabledEvent, type ViewStats, addAbsCaptureTimeExtMap, addExtMap, assert, buildDeviceList, calculateStd, captureAudioSsrcMetrics, captureCandidatePairInfoMetrics, captureCommonSsrcMetrics, captureSsrcInfo, captureVideoSsrcMetrics, changeMediaDirection, cleanSdp, compareLocalDevices, createACFCalculator, createMicAnalyser, createWorker, deprioritizeH264, detectMicrophoneNotWorking, enumerate, filterMidExtension, filterMsidSemantic, fromLocation, generateByteString, getConstraints, getCurrentPeerConnections, getDeviceData, getDisplayMedia, getHandler, getIssuesAndMetrics, getMediaConstraints, getMediaSettings, getNumFailedStatsReports, getNumFailedTrackSsrcLookups, getNumMissingTrackSsrcLookups, getOptimalBitrate, getPeerConnectionIndex, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isMobile, isRelayed, maybeRejectNoH264, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceSSRCs, replaceTracksInStream, _default as rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, type ssrcStats, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, variance };
|