@whereby.com/media 1.17.2 → 1.17.4
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 +264 -382
- package/dist/index.d.cts +67 -7
- package/dist/index.d.mts +67 -7
- package/dist/index.d.ts +67 -7
- package/dist/index.mjs +264 -382
- package/dist/legacy-esm.js +264 -382
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -102,7 +102,7 @@ declare class Logger {
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
interface StatsMonitor {
|
|
105
|
-
getUpdatedStats: () =>
|
|
105
|
+
getUpdatedStats: () => Promise<Record<string, ViewStats> | undefined>;
|
|
106
106
|
stop: () => void;
|
|
107
107
|
}
|
|
108
108
|
interface StatsSubscription {
|
|
@@ -113,17 +113,78 @@ interface StatsMonitorState {
|
|
|
113
113
|
getClients: () => any[];
|
|
114
114
|
lastPressureObserverRecord?: any;
|
|
115
115
|
lastUpdateTime: number;
|
|
116
|
-
nextTimeout?:
|
|
116
|
+
nextTimeout?: number;
|
|
117
117
|
pressureObserver?: any;
|
|
118
|
-
statsByView:
|
|
118
|
+
statsByView: Record<string, ViewStats>;
|
|
119
119
|
subscriptions: StatsSubscription[];
|
|
120
|
+
numFailedStatsReports: number;
|
|
120
121
|
}
|
|
121
122
|
interface StatsMonitorOptions {
|
|
122
123
|
interval: number;
|
|
123
124
|
logger: Pick<Logger, "debug" | "error" | "info" | "warn">;
|
|
124
125
|
}
|
|
125
|
-
|
|
126
|
-
|
|
126
|
+
interface TrackStats {
|
|
127
|
+
startTime: number;
|
|
128
|
+
updated: number;
|
|
129
|
+
ssrcs: Record<number, ssrcStats>;
|
|
130
|
+
}
|
|
131
|
+
interface ViewStats {
|
|
132
|
+
startTime?: number;
|
|
133
|
+
updated?: number;
|
|
134
|
+
pressure?: number | null;
|
|
135
|
+
candidatePairs?: any;
|
|
136
|
+
tracks: Record<string, TrackStats>;
|
|
137
|
+
}
|
|
138
|
+
interface ssrcStats {
|
|
139
|
+
startTime: number;
|
|
140
|
+
updated: number;
|
|
141
|
+
pcIndex: number;
|
|
142
|
+
direction?: string;
|
|
143
|
+
bitrate?: number;
|
|
144
|
+
fractionLost?: number;
|
|
145
|
+
height?: number;
|
|
146
|
+
lossRatio?: number;
|
|
147
|
+
pliRate?: number;
|
|
148
|
+
fps?: number;
|
|
149
|
+
audioLevel?: number;
|
|
150
|
+
audioConcealment?: number;
|
|
151
|
+
audioDeceleration?: number;
|
|
152
|
+
audioAcceleration?: number;
|
|
153
|
+
sourceHeight?: number;
|
|
154
|
+
jitter?: number;
|
|
155
|
+
roundTripTime?: number;
|
|
156
|
+
codec?: string;
|
|
157
|
+
byteCount?: number;
|
|
158
|
+
kind?: string;
|
|
159
|
+
ssrc?: number;
|
|
160
|
+
mid?: number;
|
|
161
|
+
rid?: string;
|
|
162
|
+
nackCount?: number;
|
|
163
|
+
nackRate?: number;
|
|
164
|
+
packetCount?: number;
|
|
165
|
+
packetRate?: number;
|
|
166
|
+
headerByteCount?: number;
|
|
167
|
+
mediaRatio?: number;
|
|
168
|
+
sendDelay?: number;
|
|
169
|
+
retransRatio?: number;
|
|
170
|
+
width?: number;
|
|
171
|
+
qualityLimitationReason?: string;
|
|
172
|
+
pliCount?: number;
|
|
173
|
+
firCount?: number;
|
|
174
|
+
firRate?: number;
|
|
175
|
+
kfCount?: number;
|
|
176
|
+
kfRate?: number;
|
|
177
|
+
frameCount?: number;
|
|
178
|
+
qpf?: number;
|
|
179
|
+
encodeTime?: number;
|
|
180
|
+
sourceWidth?: number;
|
|
181
|
+
sourceFps?: number;
|
|
182
|
+
}
|
|
183
|
+
declare const getStats: () => {
|
|
184
|
+
[x: string]: ViewStats;
|
|
185
|
+
};
|
|
186
|
+
declare const getNumFailedStatsReports: () => number;
|
|
187
|
+
declare const getUpdatedStats: () => Promise<Record<string, ViewStats> | undefined> | undefined;
|
|
127
188
|
declare const setClientProvider: (provider: any) => any;
|
|
128
189
|
declare function subscribeStats(subscription: StatsSubscription, options?: StatsMonitorOptions, state?: StatsMonitorState): {
|
|
129
190
|
stop(): void;
|
|
@@ -360,7 +421,6 @@ declare function getDeviceData({ audioTrack, videoTrack, devices, stoppedVideoTr
|
|
|
360
421
|
}): GetDeviceDataResult;
|
|
361
422
|
declare function stopStreamTracks(stream: MediaStream, only?: "audio" | "video" | false): void;
|
|
362
423
|
declare function replaceTracksInStream(stream: MediaStream, newStream: MediaStream, only: "audio" | "video" | false): MediaStreamTrack[];
|
|
363
|
-
declare function getStream2(constraintOpt: GetConstraintsOptions, additionalOpts?: GetStreamOptions): Promise<GetStreamResult>;
|
|
364
424
|
declare function getStream(constraintOpt: any, { replaceStream, fallback }?: GetStreamOptions): Promise<GetStreamResult>;
|
|
365
425
|
declare function hasGetDisplayMedia(): boolean;
|
|
366
426
|
declare function getDisplayMedia(constraints?: {
|
|
@@ -1508,4 +1568,4 @@ declare class RtcStream {
|
|
|
1508
1568
|
static getTypeFromId(id: string): string;
|
|
1509
1569
|
}
|
|
1510
1570
|
|
|
1511
|
-
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,
|
|
1571
|
+
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, 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
|
@@ -102,7 +102,7 @@ declare class Logger {
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
interface StatsMonitor {
|
|
105
|
-
getUpdatedStats: () =>
|
|
105
|
+
getUpdatedStats: () => Promise<Record<string, ViewStats> | undefined>;
|
|
106
106
|
stop: () => void;
|
|
107
107
|
}
|
|
108
108
|
interface StatsSubscription {
|
|
@@ -113,17 +113,78 @@ interface StatsMonitorState {
|
|
|
113
113
|
getClients: () => any[];
|
|
114
114
|
lastPressureObserverRecord?: any;
|
|
115
115
|
lastUpdateTime: number;
|
|
116
|
-
nextTimeout?:
|
|
116
|
+
nextTimeout?: number;
|
|
117
117
|
pressureObserver?: any;
|
|
118
|
-
statsByView:
|
|
118
|
+
statsByView: Record<string, ViewStats>;
|
|
119
119
|
subscriptions: StatsSubscription[];
|
|
120
|
+
numFailedStatsReports: number;
|
|
120
121
|
}
|
|
121
122
|
interface StatsMonitorOptions {
|
|
122
123
|
interval: number;
|
|
123
124
|
logger: Pick<Logger, "debug" | "error" | "info" | "warn">;
|
|
124
125
|
}
|
|
125
|
-
|
|
126
|
-
|
|
126
|
+
interface TrackStats {
|
|
127
|
+
startTime: number;
|
|
128
|
+
updated: number;
|
|
129
|
+
ssrcs: Record<number, ssrcStats>;
|
|
130
|
+
}
|
|
131
|
+
interface ViewStats {
|
|
132
|
+
startTime?: number;
|
|
133
|
+
updated?: number;
|
|
134
|
+
pressure?: number | null;
|
|
135
|
+
candidatePairs?: any;
|
|
136
|
+
tracks: Record<string, TrackStats>;
|
|
137
|
+
}
|
|
138
|
+
interface ssrcStats {
|
|
139
|
+
startTime: number;
|
|
140
|
+
updated: number;
|
|
141
|
+
pcIndex: number;
|
|
142
|
+
direction?: string;
|
|
143
|
+
bitrate?: number;
|
|
144
|
+
fractionLost?: number;
|
|
145
|
+
height?: number;
|
|
146
|
+
lossRatio?: number;
|
|
147
|
+
pliRate?: number;
|
|
148
|
+
fps?: number;
|
|
149
|
+
audioLevel?: number;
|
|
150
|
+
audioConcealment?: number;
|
|
151
|
+
audioDeceleration?: number;
|
|
152
|
+
audioAcceleration?: number;
|
|
153
|
+
sourceHeight?: number;
|
|
154
|
+
jitter?: number;
|
|
155
|
+
roundTripTime?: number;
|
|
156
|
+
codec?: string;
|
|
157
|
+
byteCount?: number;
|
|
158
|
+
kind?: string;
|
|
159
|
+
ssrc?: number;
|
|
160
|
+
mid?: number;
|
|
161
|
+
rid?: string;
|
|
162
|
+
nackCount?: number;
|
|
163
|
+
nackRate?: number;
|
|
164
|
+
packetCount?: number;
|
|
165
|
+
packetRate?: number;
|
|
166
|
+
headerByteCount?: number;
|
|
167
|
+
mediaRatio?: number;
|
|
168
|
+
sendDelay?: number;
|
|
169
|
+
retransRatio?: number;
|
|
170
|
+
width?: number;
|
|
171
|
+
qualityLimitationReason?: string;
|
|
172
|
+
pliCount?: number;
|
|
173
|
+
firCount?: number;
|
|
174
|
+
firRate?: number;
|
|
175
|
+
kfCount?: number;
|
|
176
|
+
kfRate?: number;
|
|
177
|
+
frameCount?: number;
|
|
178
|
+
qpf?: number;
|
|
179
|
+
encodeTime?: number;
|
|
180
|
+
sourceWidth?: number;
|
|
181
|
+
sourceFps?: number;
|
|
182
|
+
}
|
|
183
|
+
declare const getStats: () => {
|
|
184
|
+
[x: string]: ViewStats;
|
|
185
|
+
};
|
|
186
|
+
declare const getNumFailedStatsReports: () => number;
|
|
187
|
+
declare const getUpdatedStats: () => Promise<Record<string, ViewStats> | undefined> | undefined;
|
|
127
188
|
declare const setClientProvider: (provider: any) => any;
|
|
128
189
|
declare function subscribeStats(subscription: StatsSubscription, options?: StatsMonitorOptions, state?: StatsMonitorState): {
|
|
129
190
|
stop(): void;
|
|
@@ -360,7 +421,6 @@ declare function getDeviceData({ audioTrack, videoTrack, devices, stoppedVideoTr
|
|
|
360
421
|
}): GetDeviceDataResult;
|
|
361
422
|
declare function stopStreamTracks(stream: MediaStream, only?: "audio" | "video" | false): void;
|
|
362
423
|
declare function replaceTracksInStream(stream: MediaStream, newStream: MediaStream, only: "audio" | "video" | false): MediaStreamTrack[];
|
|
363
|
-
declare function getStream2(constraintOpt: GetConstraintsOptions, additionalOpts?: GetStreamOptions): Promise<GetStreamResult>;
|
|
364
424
|
declare function getStream(constraintOpt: any, { replaceStream, fallback }?: GetStreamOptions): Promise<GetStreamResult>;
|
|
365
425
|
declare function hasGetDisplayMedia(): boolean;
|
|
366
426
|
declare function getDisplayMedia(constraints?: {
|
|
@@ -1508,4 +1568,4 @@ declare class RtcStream {
|
|
|
1508
1568
|
static getTypeFromId(id: string): string;
|
|
1509
1569
|
}
|
|
1510
1570
|
|
|
1511
|
-
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,
|
|
1571
|
+
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, 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
|
@@ -102,7 +102,7 @@ declare class Logger {
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
interface StatsMonitor {
|
|
105
|
-
getUpdatedStats: () =>
|
|
105
|
+
getUpdatedStats: () => Promise<Record<string, ViewStats> | undefined>;
|
|
106
106
|
stop: () => void;
|
|
107
107
|
}
|
|
108
108
|
interface StatsSubscription {
|
|
@@ -113,17 +113,78 @@ interface StatsMonitorState {
|
|
|
113
113
|
getClients: () => any[];
|
|
114
114
|
lastPressureObserverRecord?: any;
|
|
115
115
|
lastUpdateTime: number;
|
|
116
|
-
nextTimeout?:
|
|
116
|
+
nextTimeout?: number;
|
|
117
117
|
pressureObserver?: any;
|
|
118
|
-
statsByView:
|
|
118
|
+
statsByView: Record<string, ViewStats>;
|
|
119
119
|
subscriptions: StatsSubscription[];
|
|
120
|
+
numFailedStatsReports: number;
|
|
120
121
|
}
|
|
121
122
|
interface StatsMonitorOptions {
|
|
122
123
|
interval: number;
|
|
123
124
|
logger: Pick<Logger, "debug" | "error" | "info" | "warn">;
|
|
124
125
|
}
|
|
125
|
-
|
|
126
|
-
|
|
126
|
+
interface TrackStats {
|
|
127
|
+
startTime: number;
|
|
128
|
+
updated: number;
|
|
129
|
+
ssrcs: Record<number, ssrcStats>;
|
|
130
|
+
}
|
|
131
|
+
interface ViewStats {
|
|
132
|
+
startTime?: number;
|
|
133
|
+
updated?: number;
|
|
134
|
+
pressure?: number | null;
|
|
135
|
+
candidatePairs?: any;
|
|
136
|
+
tracks: Record<string, TrackStats>;
|
|
137
|
+
}
|
|
138
|
+
interface ssrcStats {
|
|
139
|
+
startTime: number;
|
|
140
|
+
updated: number;
|
|
141
|
+
pcIndex: number;
|
|
142
|
+
direction?: string;
|
|
143
|
+
bitrate?: number;
|
|
144
|
+
fractionLost?: number;
|
|
145
|
+
height?: number;
|
|
146
|
+
lossRatio?: number;
|
|
147
|
+
pliRate?: number;
|
|
148
|
+
fps?: number;
|
|
149
|
+
audioLevel?: number;
|
|
150
|
+
audioConcealment?: number;
|
|
151
|
+
audioDeceleration?: number;
|
|
152
|
+
audioAcceleration?: number;
|
|
153
|
+
sourceHeight?: number;
|
|
154
|
+
jitter?: number;
|
|
155
|
+
roundTripTime?: number;
|
|
156
|
+
codec?: string;
|
|
157
|
+
byteCount?: number;
|
|
158
|
+
kind?: string;
|
|
159
|
+
ssrc?: number;
|
|
160
|
+
mid?: number;
|
|
161
|
+
rid?: string;
|
|
162
|
+
nackCount?: number;
|
|
163
|
+
nackRate?: number;
|
|
164
|
+
packetCount?: number;
|
|
165
|
+
packetRate?: number;
|
|
166
|
+
headerByteCount?: number;
|
|
167
|
+
mediaRatio?: number;
|
|
168
|
+
sendDelay?: number;
|
|
169
|
+
retransRatio?: number;
|
|
170
|
+
width?: number;
|
|
171
|
+
qualityLimitationReason?: string;
|
|
172
|
+
pliCount?: number;
|
|
173
|
+
firCount?: number;
|
|
174
|
+
firRate?: number;
|
|
175
|
+
kfCount?: number;
|
|
176
|
+
kfRate?: number;
|
|
177
|
+
frameCount?: number;
|
|
178
|
+
qpf?: number;
|
|
179
|
+
encodeTime?: number;
|
|
180
|
+
sourceWidth?: number;
|
|
181
|
+
sourceFps?: number;
|
|
182
|
+
}
|
|
183
|
+
declare const getStats: () => {
|
|
184
|
+
[x: string]: ViewStats;
|
|
185
|
+
};
|
|
186
|
+
declare const getNumFailedStatsReports: () => number;
|
|
187
|
+
declare const getUpdatedStats: () => Promise<Record<string, ViewStats> | undefined> | undefined;
|
|
127
188
|
declare const setClientProvider: (provider: any) => any;
|
|
128
189
|
declare function subscribeStats(subscription: StatsSubscription, options?: StatsMonitorOptions, state?: StatsMonitorState): {
|
|
129
190
|
stop(): void;
|
|
@@ -360,7 +421,6 @@ declare function getDeviceData({ audioTrack, videoTrack, devices, stoppedVideoTr
|
|
|
360
421
|
}): GetDeviceDataResult;
|
|
361
422
|
declare function stopStreamTracks(stream: MediaStream, only?: "audio" | "video" | false): void;
|
|
362
423
|
declare function replaceTracksInStream(stream: MediaStream, newStream: MediaStream, only: "audio" | "video" | false): MediaStreamTrack[];
|
|
363
|
-
declare function getStream2(constraintOpt: GetConstraintsOptions, additionalOpts?: GetStreamOptions): Promise<GetStreamResult>;
|
|
364
424
|
declare function getStream(constraintOpt: any, { replaceStream, fallback }?: GetStreamOptions): Promise<GetStreamResult>;
|
|
365
425
|
declare function hasGetDisplayMedia(): boolean;
|
|
366
426
|
declare function getDisplayMedia(constraints?: {
|
|
@@ -1508,4 +1568,4 @@ declare class RtcStream {
|
|
|
1508
1568
|
static getTypeFromId(id: string): string;
|
|
1509
1569
|
}
|
|
1510
1570
|
|
|
1511
|
-
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,
|
|
1571
|
+
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, 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 };
|