@whereby.com/media 1.30.0 → 1.31.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/index.cjs +3 -57
- package/dist/index.d.cts +2 -10
- package/dist/index.d.mts +2 -10
- package/dist/index.d.ts +2 -10
- package/dist/index.mjs +4 -55
- package/dist/legacy-esm.js +4 -55
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1062,32 +1062,6 @@ function addAbsCaptureTimeExtMap(sdp) {
|
|
|
1062
1062
|
return addExtMap(sdp, absCaptureTimeUri, true, true);
|
|
1063
1063
|
}
|
|
1064
1064
|
|
|
1065
|
-
function isRelayed(pc) {
|
|
1066
|
-
return pc.getStats(null).then((result) => {
|
|
1067
|
-
let localCandidateType;
|
|
1068
|
-
let remoteCandidateType;
|
|
1069
|
-
result.forEach((report) => {
|
|
1070
|
-
if (report.type === "transport" && report.selectedCandidatePairId) {
|
|
1071
|
-
const transport = result.get(report.selectedCandidatePairId);
|
|
1072
|
-
if (!transport) {
|
|
1073
|
-
return;
|
|
1074
|
-
}
|
|
1075
|
-
localCandidateType = result.get(transport.localCandidateId).candidateType;
|
|
1076
|
-
remoteCandidateType = result.get(transport.remoteCandidateId).candidateType;
|
|
1077
|
-
return;
|
|
1078
|
-
}
|
|
1079
|
-
if (report.type === "candidate-pair" && report.selected) {
|
|
1080
|
-
localCandidateType = result.get(report.localCandidateId).candidateType;
|
|
1081
|
-
remoteCandidateType = result.get(report.remoteCandidateId).candidateType;
|
|
1082
|
-
}
|
|
1083
|
-
});
|
|
1084
|
-
return (localCandidateType === "relay" ||
|
|
1085
|
-
localCandidateType === "relayed" ||
|
|
1086
|
-
remoteCandidateType === "relay" ||
|
|
1087
|
-
remoteCandidateType === "relayed");
|
|
1088
|
-
});
|
|
1089
|
-
}
|
|
1090
|
-
|
|
1091
1065
|
function setVideoBandwidthUsingSetParameters(pc, bandwidth, logger = console) {
|
|
1092
1066
|
const sender = pc.getSenders().find((s) => s.track && s.track.kind === "video");
|
|
1093
1067
|
if (!sender) {
|
|
@@ -1111,15 +1085,11 @@ function setVideoBandwidthUsingSetParameters(pc, bandwidth, logger = console) {
|
|
|
1111
1085
|
});
|
|
1112
1086
|
}
|
|
1113
1087
|
|
|
1114
|
-
const MAXIMUM_TURN_BANDWIDTH = 1280;
|
|
1115
|
-
const MAXIMUM_TURN_BANDWIDTH_UNLIMITED = -1;
|
|
1116
|
-
const MEDIA_JITTER_BUFFER_TARGET = 400;
|
|
1117
|
-
|
|
1118
1088
|
var _a$5;
|
|
1119
1089
|
const adapter$5 = (_a$5 = adapterRaw.default) !== null && _a$5 !== void 0 ? _a$5 : adapterRaw;
|
|
1120
1090
|
const logger$a = new Logger();
|
|
1121
1091
|
class Session {
|
|
1122
|
-
constructor({ peerConnectionId, bandwidth,
|
|
1092
|
+
constructor({ peerConnectionId, bandwidth, deprioritizeH264Encoding, }) {
|
|
1123
1093
|
this.peerConnectionId = peerConnectionId;
|
|
1124
1094
|
this.relayCandidateSeen = false;
|
|
1125
1095
|
this.serverReflexiveCandidateSeen = false;
|
|
@@ -1136,7 +1106,6 @@ class Session {
|
|
|
1136
1106
|
totalRecv: 0,
|
|
1137
1107
|
};
|
|
1138
1108
|
this.bandwidth = bandwidth || 0;
|
|
1139
|
-
this.maximumTurnBandwidth = maximumTurnBandwidth;
|
|
1140
1109
|
this.pending = [];
|
|
1141
1110
|
this.isOperationPending = false;
|
|
1142
1111
|
this.streamIds = [];
|
|
@@ -1396,19 +1365,6 @@ class Session {
|
|
|
1396
1365
|
});
|
|
1397
1366
|
}
|
|
1398
1367
|
}
|
|
1399
|
-
maybeRestrictRelayBandwidth() {
|
|
1400
|
-
if (this.maximumTurnBandwidth === MAXIMUM_TURN_BANDWIDTH_UNLIMITED) {
|
|
1401
|
-
return;
|
|
1402
|
-
}
|
|
1403
|
-
if (!this.pc.getStats) {
|
|
1404
|
-
return;
|
|
1405
|
-
}
|
|
1406
|
-
isRelayed(this.pc).then((isRelayed) => {
|
|
1407
|
-
if (isRelayed && this.bandwidth === 0) {
|
|
1408
|
-
this.changeBandwidth(this.maximumTurnBandwidth);
|
|
1409
|
-
}
|
|
1410
|
-
});
|
|
1411
|
-
}
|
|
1412
1368
|
changeBandwidth(bandwidth) {
|
|
1413
1369
|
if (bandwidth === this.bandwidth) {
|
|
1414
1370
|
return;
|
|
@@ -1439,6 +1395,8 @@ class Session {
|
|
|
1439
1395
|
}
|
|
1440
1396
|
}
|
|
1441
1397
|
|
|
1398
|
+
const MEDIA_JITTER_BUFFER_TARGET = 400;
|
|
1399
|
+
|
|
1442
1400
|
var _a$4;
|
|
1443
1401
|
const adapter$4 = (_a$4 = adapterRaw.default) !== null && _a$4 !== void 0 ? _a$4 : adapterRaw;
|
|
1444
1402
|
function detectMicrophoneNotWorking(pc) {
|
|
@@ -3257,9 +3215,6 @@ class P2pRtcManager {
|
|
|
3257
3215
|
supportsScreenShareAudio() {
|
|
3258
3216
|
return true;
|
|
3259
3217
|
}
|
|
3260
|
-
maybeRestrictRelayBandwidth(session) {
|
|
3261
|
-
session.maybeRestrictRelayBandwidth();
|
|
3262
|
-
}
|
|
3263
3218
|
addNewStream(streamId, stream, audioPaused, videoPaused, beforeEffectTracks = []) {
|
|
3264
3219
|
if (stream === this.localStreams[streamId]) {
|
|
3265
3220
|
return;
|
|
@@ -3530,9 +3485,6 @@ class P2pRtcManager {
|
|
|
3530
3485
|
this.peerConnections[peerConnectionId] = session = new Session({
|
|
3531
3486
|
peerConnectionId,
|
|
3532
3487
|
bandwidth: initialBandwidth,
|
|
3533
|
-
maximumTurnBandwidth: this._features.unlimitedBandwidthWhenUsingRelayP2POn
|
|
3534
|
-
? MAXIMUM_TURN_BANDWIDTH_UNLIMITED
|
|
3535
|
-
: MAXIMUM_TURN_BANDWIDTH,
|
|
3536
3488
|
deprioritizeH264Encoding,
|
|
3537
3489
|
});
|
|
3538
3490
|
this.totalSessionsCreated++;
|
|
@@ -3637,9 +3589,6 @@ class P2pRtcManager {
|
|
|
3637
3589
|
(pc.iceConnectionState.match(/connected|completed/) ||
|
|
3638
3590
|
(browserName$1 === "chrome" && pc.localDescription && pc.localDescription.type === "answer"))) {
|
|
3639
3591
|
session.wasEverConnected = true;
|
|
3640
|
-
if (this._features.bandwidth !== "false") {
|
|
3641
|
-
this.maybeRestrictRelayBandwidth(session);
|
|
3642
|
-
}
|
|
3643
3592
|
}
|
|
3644
3593
|
if (this._isAudioOnlyMode) {
|
|
3645
3594
|
session.setAudioOnly(true, this._screenshareVideoTrackIds);
|
|
@@ -8031,8 +7980,6 @@ exports.EVENTS = EVENTS;
|
|
|
8031
7980
|
exports.KNOCK_MESSAGES = KNOCK_MESSAGES;
|
|
8032
7981
|
exports.KalmanFilter = KalmanFilter;
|
|
8033
7982
|
exports.Logger = Logger;
|
|
8034
|
-
exports.MAXIMUM_TURN_BANDWIDTH = MAXIMUM_TURN_BANDWIDTH;
|
|
8035
|
-
exports.MAXIMUM_TURN_BANDWIDTH_UNLIMITED = MAXIMUM_TURN_BANDWIDTH_UNLIMITED;
|
|
8036
7983
|
exports.MEDIA_JITTER_BUFFER_TARGET = MEDIA_JITTER_BUFFER_TARGET;
|
|
8037
7984
|
exports.NoDevicesError = NoDevicesError;
|
|
8038
7985
|
exports.P2pRtcManager = P2pRtcManager;
|
|
@@ -8105,7 +8052,6 @@ exports.getUserMedia = getUserMedia;
|
|
|
8105
8052
|
exports.hasGetDisplayMedia = hasGetDisplayMedia;
|
|
8106
8053
|
exports.ipRegex = ipRegex;
|
|
8107
8054
|
exports.isMobile = isMobile;
|
|
8108
|
-
exports.isRelayed = isRelayed;
|
|
8109
8055
|
exports.maybeRejectNoH264 = maybeRejectNoH264;
|
|
8110
8056
|
exports.maybeTurnOnly = maybeTurnOnly;
|
|
8111
8057
|
exports.modifyMediaCapabilities = modifyMediaCapabilities;
|
package/dist/index.d.cts
CHANGED
|
@@ -256,8 +256,6 @@ declare class BandwidthTester extends EventEmitter {
|
|
|
256
256
|
|
|
257
257
|
declare function detectMicrophoneNotWorking(pc: any): any;
|
|
258
258
|
|
|
259
|
-
declare const MAXIMUM_TURN_BANDWIDTH = 1280;
|
|
260
|
-
declare const MAXIMUM_TURN_BANDWIDTH_UNLIMITED = -1;
|
|
261
259
|
declare const MEDIA_JITTER_BUFFER_TARGET = 400;
|
|
262
260
|
|
|
263
261
|
declare enum RtcEventNames {
|
|
@@ -486,7 +484,6 @@ declare class P2pRtcManager implements RtcManager {
|
|
|
486
484
|
isSfu: any;
|
|
487
485
|
}): boolean;
|
|
488
486
|
supportsScreenShareAudio(): boolean;
|
|
489
|
-
maybeRestrictRelayBandwidth(session: any): void;
|
|
490
487
|
addNewStream(streamId: string, stream: MediaStream, audioPaused: boolean, videoPaused: boolean, beforeEffectTracks?: CustomMediaStreamTrack[]): void;
|
|
491
488
|
replaceTrack(oldTrack: CustomMediaStreamTrack | null, newTrack: CustomMediaStreamTrack): Promise<any[]>;
|
|
492
489
|
disconnectAll(): void;
|
|
@@ -1254,7 +1251,6 @@ declare class Session {
|
|
|
1254
1251
|
totalRecv: number;
|
|
1255
1252
|
};
|
|
1256
1253
|
bandwidth: any;
|
|
1257
|
-
maximumTurnBandwidth: any;
|
|
1258
1254
|
pending: any[];
|
|
1259
1255
|
isOperationPending: boolean;
|
|
1260
1256
|
streamIds: any[];
|
|
@@ -1272,10 +1268,9 @@ declare class Session {
|
|
|
1272
1268
|
shouldAddLocalVideo: any;
|
|
1273
1269
|
signalingState: any;
|
|
1274
1270
|
srdComplete: any;
|
|
1275
|
-
constructor({ peerConnectionId, bandwidth,
|
|
1271
|
+
constructor({ peerConnectionId, bandwidth, deprioritizeH264Encoding, }: {
|
|
1276
1272
|
peerConnectionId: any;
|
|
1277
1273
|
bandwidth: any;
|
|
1278
|
-
maximumTurnBandwidth: any;
|
|
1279
1274
|
deprioritizeH264Encoding: any;
|
|
1280
1275
|
});
|
|
1281
1276
|
setAndGetPeerConnection({ clientId, constraints, peerConnectionConfig, shouldAddLocalVideo, }: {
|
|
@@ -1296,7 +1291,6 @@ declare class Session {
|
|
|
1296
1291
|
close(): void;
|
|
1297
1292
|
hasConnectedPeerConnection(): any;
|
|
1298
1293
|
replaceTrack(oldTrack: MediaStreamTrack, newTrack: MediaStreamTrack): any;
|
|
1299
|
-
maybeRestrictRelayBandwidth(): void;
|
|
1300
1294
|
changeBandwidth(bandwidth: any): void;
|
|
1301
1295
|
setAudioOnly(enable: boolean, excludedTrackIds?: any[]): void;
|
|
1302
1296
|
}
|
|
@@ -1331,8 +1325,6 @@ declare class SfuV2Parser {
|
|
|
1331
1325
|
};
|
|
1332
1326
|
}
|
|
1333
1327
|
|
|
1334
|
-
declare function isRelayed(pc: any): any;
|
|
1335
|
-
|
|
1336
1328
|
declare class VegaConnection extends EventEmitter$1 {
|
|
1337
1329
|
wsUrl: string;
|
|
1338
1330
|
protocol: string;
|
|
@@ -1808,5 +1800,5 @@ declare class RtcStream {
|
|
|
1808
1800
|
static getTypeFromId(id: string): string;
|
|
1809
1801
|
}
|
|
1810
1802
|
|
|
1811
|
-
export { ADDITIONAL_SCREEN_SHARE_SETTINGS, ADDITIONAL_SCREEN_SHARE_SETTINGS_VP9, AUDIO_SETTINGS, BandwidthTester, EVENTS, KNOCK_MESSAGES, KalmanFilter, Logger,
|
|
1803
|
+
export { ADDITIONAL_SCREEN_SHARE_SETTINGS, ADDITIONAL_SCREEN_SHARE_SETTINGS_VP9, AUDIO_SETTINGS, BandwidthTester, EVENTS, KNOCK_MESSAGES, KalmanFilter, Logger, MEDIA_JITTER_BUFFER_TARGET, NoDevicesError, P2pRtcManager, PROTOCOL_ERRORS, PROTOCOL_EVENTS, PROTOCOL_REQUESTS, PROTOCOL_RESPONSES, RELAY_MESSAGES, ReconnectManager, RtcEventNames, RtcManagerDispatcher, RtcStream, SCREEN_SHARE_SETTINGS, SCREEN_SHARE_SETTINGS_VP9, SCREEN_SHARE_SIMULCAST_SETTINGS, STREAM_TYPES, ServerSocket, Session, SfuV2Parser, TYPES, VIDEO_SETTINGS_HD, VIDEO_SETTINGS_SD, VIDEO_SETTINGS_VP9, VIDEO_SETTINGS_VP9_KEY, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH_KEY, VegaConnection, VegaMediaQualityMonitor, VegaRtcManager, addAbsCaptureTimeExtMap, addExtMap, assert, buildDeviceList, calculateStd, captureAudioSsrcMetrics, captureCandidatePairInfoMetrics, captureCommonSsrcMetrics, captureSsrcInfo, captureVideoSsrcMetrics, changeMediaDirection, cleanSdp, compareLocalDevices, createACFCalculator, createMicAnalyser, createWorker, deprioritizeH264, detectMicrophoneNotWorking, enumerate, external_stun_servers, filterMidExtension, filterMsidSemantic, fromLocation, generateByteString, getConstraints, getCurrentPeerConnections, getDeviceData, getDisplayMedia, getIssuesAndMetrics, getMediaConstraints, getMediaSettings, getMediasoupDevice, getNumFailedStatsReports, getNumFailedTrackSsrcLookups, getNumMissingTrackSsrcLookups, getPeerConnectionIndex, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isMobile, maybeRejectNoH264, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceSSRCs, replaceTracksInStream, _default as rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, sortCodecs, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, turnServerOverride, variance };
|
|
1812
1804
|
export type { AddSpotlightRequest, AudioEnableRequest, AudioEnableRequestedEvent, AudioEnabledEvent, BreakoutConfig, BreakoutGroupJoinedEvent, BreakoutSessionUpdatedEvent, CannotJoinUnclaimedRoomError, ChatMessage, ClientKickedEvent, ClientLeftEvent, ClientMetadataPayload, ClientMetadataReceivedEvent, ClientRole, ClientUnableToJoinEvent, CloudRecordingStartedEvent, Codec, Credentials, CustomMediaStreamTrack, ForbiddenError, ForbiddenErrorNames, GetConstraintsOptions, GetDeviceDataResult, GetMediaConstraintsOptions, GetStreamOptions, GetStreamResult, GetUpdatedDevicesResult, HostPresenceControlsError, IdentifyDeviceRequest, InternalServerError, IssuesAndMetricsByView, JoinRoomRequest, KnockAcceptedEvent, KnockRejectedEvent, KnockRoomRequest, KnockerLeftEvent, LiveTranscriptionStartedEvent, LiveTranscriptionStoppedEvent, MaxViewerLimitReachedError, NewClientEvent, OrganizationPlanExhaustedError, RemoveSpotlightRequest, RoleName, RoomConcurrencyControlsError, RoomFullError, RoomJoinedErrors, RoomJoinedEvent, RoomJoinedSuccess, RoomKnockedEvent, RoomLockedError, RoomLockedEvent, RoomMeetingTimeExhaustedError, RoomMode, RoomSessionEndedEvent, RtcClientConnectionStatusChangedPayload, RtcEvents, RtcLocalStreamTrackAddedPayload, RtcLocalStreamTrackRemovedPayload, RtcManager, RtcManagerCreatedPayload, RtcStreamAddedPayload, ScreenshareStartedEvent, ScreenshareStoppedEvent, SendClientMetadataRequest, SignalClient, SignalEvents, SignalKnocker, SignalRequests, SocketConf, SocketManager, Spotlight, SpotlightAddedEvent, SpotlightRemovedEvent, StatsMonitorOptions, StatsMonitorState, StatsSubscription, TrackStats, TurnTransportProtocol, UpdatedDeviceInfo, UpdatedDevicesInfo, VideoEnableRequest, VideoEnableRequestedEvent, VideoEnabledEvent, ViewStats, ssrcStats };
|
package/dist/index.d.mts
CHANGED
|
@@ -256,8 +256,6 @@ declare class BandwidthTester extends EventEmitter {
|
|
|
256
256
|
|
|
257
257
|
declare function detectMicrophoneNotWorking(pc: any): any;
|
|
258
258
|
|
|
259
|
-
declare const MAXIMUM_TURN_BANDWIDTH = 1280;
|
|
260
|
-
declare const MAXIMUM_TURN_BANDWIDTH_UNLIMITED = -1;
|
|
261
259
|
declare const MEDIA_JITTER_BUFFER_TARGET = 400;
|
|
262
260
|
|
|
263
261
|
declare enum RtcEventNames {
|
|
@@ -486,7 +484,6 @@ declare class P2pRtcManager implements RtcManager {
|
|
|
486
484
|
isSfu: any;
|
|
487
485
|
}): boolean;
|
|
488
486
|
supportsScreenShareAudio(): boolean;
|
|
489
|
-
maybeRestrictRelayBandwidth(session: any): void;
|
|
490
487
|
addNewStream(streamId: string, stream: MediaStream, audioPaused: boolean, videoPaused: boolean, beforeEffectTracks?: CustomMediaStreamTrack[]): void;
|
|
491
488
|
replaceTrack(oldTrack: CustomMediaStreamTrack | null, newTrack: CustomMediaStreamTrack): Promise<any[]>;
|
|
492
489
|
disconnectAll(): void;
|
|
@@ -1254,7 +1251,6 @@ declare class Session {
|
|
|
1254
1251
|
totalRecv: number;
|
|
1255
1252
|
};
|
|
1256
1253
|
bandwidth: any;
|
|
1257
|
-
maximumTurnBandwidth: any;
|
|
1258
1254
|
pending: any[];
|
|
1259
1255
|
isOperationPending: boolean;
|
|
1260
1256
|
streamIds: any[];
|
|
@@ -1272,10 +1268,9 @@ declare class Session {
|
|
|
1272
1268
|
shouldAddLocalVideo: any;
|
|
1273
1269
|
signalingState: any;
|
|
1274
1270
|
srdComplete: any;
|
|
1275
|
-
constructor({ peerConnectionId, bandwidth,
|
|
1271
|
+
constructor({ peerConnectionId, bandwidth, deprioritizeH264Encoding, }: {
|
|
1276
1272
|
peerConnectionId: any;
|
|
1277
1273
|
bandwidth: any;
|
|
1278
|
-
maximumTurnBandwidth: any;
|
|
1279
1274
|
deprioritizeH264Encoding: any;
|
|
1280
1275
|
});
|
|
1281
1276
|
setAndGetPeerConnection({ clientId, constraints, peerConnectionConfig, shouldAddLocalVideo, }: {
|
|
@@ -1296,7 +1291,6 @@ declare class Session {
|
|
|
1296
1291
|
close(): void;
|
|
1297
1292
|
hasConnectedPeerConnection(): any;
|
|
1298
1293
|
replaceTrack(oldTrack: MediaStreamTrack, newTrack: MediaStreamTrack): any;
|
|
1299
|
-
maybeRestrictRelayBandwidth(): void;
|
|
1300
1294
|
changeBandwidth(bandwidth: any): void;
|
|
1301
1295
|
setAudioOnly(enable: boolean, excludedTrackIds?: any[]): void;
|
|
1302
1296
|
}
|
|
@@ -1331,8 +1325,6 @@ declare class SfuV2Parser {
|
|
|
1331
1325
|
};
|
|
1332
1326
|
}
|
|
1333
1327
|
|
|
1334
|
-
declare function isRelayed(pc: any): any;
|
|
1335
|
-
|
|
1336
1328
|
declare class VegaConnection extends EventEmitter$1 {
|
|
1337
1329
|
wsUrl: string;
|
|
1338
1330
|
protocol: string;
|
|
@@ -1808,5 +1800,5 @@ declare class RtcStream {
|
|
|
1808
1800
|
static getTypeFromId(id: string): string;
|
|
1809
1801
|
}
|
|
1810
1802
|
|
|
1811
|
-
export { ADDITIONAL_SCREEN_SHARE_SETTINGS, ADDITIONAL_SCREEN_SHARE_SETTINGS_VP9, AUDIO_SETTINGS, BandwidthTester, EVENTS, KNOCK_MESSAGES, KalmanFilter, Logger,
|
|
1803
|
+
export { ADDITIONAL_SCREEN_SHARE_SETTINGS, ADDITIONAL_SCREEN_SHARE_SETTINGS_VP9, AUDIO_SETTINGS, BandwidthTester, EVENTS, KNOCK_MESSAGES, KalmanFilter, Logger, MEDIA_JITTER_BUFFER_TARGET, NoDevicesError, P2pRtcManager, PROTOCOL_ERRORS, PROTOCOL_EVENTS, PROTOCOL_REQUESTS, PROTOCOL_RESPONSES, RELAY_MESSAGES, ReconnectManager, RtcEventNames, RtcManagerDispatcher, RtcStream, SCREEN_SHARE_SETTINGS, SCREEN_SHARE_SETTINGS_VP9, SCREEN_SHARE_SIMULCAST_SETTINGS, STREAM_TYPES, ServerSocket, Session, SfuV2Parser, TYPES, VIDEO_SETTINGS_HD, VIDEO_SETTINGS_SD, VIDEO_SETTINGS_VP9, VIDEO_SETTINGS_VP9_KEY, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH_KEY, VegaConnection, VegaMediaQualityMonitor, VegaRtcManager, addAbsCaptureTimeExtMap, addExtMap, assert, buildDeviceList, calculateStd, captureAudioSsrcMetrics, captureCandidatePairInfoMetrics, captureCommonSsrcMetrics, captureSsrcInfo, captureVideoSsrcMetrics, changeMediaDirection, cleanSdp, compareLocalDevices, createACFCalculator, createMicAnalyser, createWorker, deprioritizeH264, detectMicrophoneNotWorking, enumerate, external_stun_servers, filterMidExtension, filterMsidSemantic, fromLocation, generateByteString, getConstraints, getCurrentPeerConnections, getDeviceData, getDisplayMedia, getIssuesAndMetrics, getMediaConstraints, getMediaSettings, getMediasoupDevice, getNumFailedStatsReports, getNumFailedTrackSsrcLookups, getNumMissingTrackSsrcLookups, getPeerConnectionIndex, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isMobile, maybeRejectNoH264, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceSSRCs, replaceTracksInStream, _default as rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, sortCodecs, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, turnServerOverride, variance };
|
|
1812
1804
|
export type { AddSpotlightRequest, AudioEnableRequest, AudioEnableRequestedEvent, AudioEnabledEvent, BreakoutConfig, BreakoutGroupJoinedEvent, BreakoutSessionUpdatedEvent, CannotJoinUnclaimedRoomError, ChatMessage, ClientKickedEvent, ClientLeftEvent, ClientMetadataPayload, ClientMetadataReceivedEvent, ClientRole, ClientUnableToJoinEvent, CloudRecordingStartedEvent, Codec, Credentials, CustomMediaStreamTrack, ForbiddenError, ForbiddenErrorNames, GetConstraintsOptions, GetDeviceDataResult, GetMediaConstraintsOptions, GetStreamOptions, GetStreamResult, GetUpdatedDevicesResult, HostPresenceControlsError, IdentifyDeviceRequest, InternalServerError, IssuesAndMetricsByView, JoinRoomRequest, KnockAcceptedEvent, KnockRejectedEvent, KnockRoomRequest, KnockerLeftEvent, LiveTranscriptionStartedEvent, LiveTranscriptionStoppedEvent, MaxViewerLimitReachedError, NewClientEvent, OrganizationPlanExhaustedError, RemoveSpotlightRequest, RoleName, RoomConcurrencyControlsError, RoomFullError, RoomJoinedErrors, RoomJoinedEvent, RoomJoinedSuccess, RoomKnockedEvent, RoomLockedError, RoomLockedEvent, RoomMeetingTimeExhaustedError, RoomMode, RoomSessionEndedEvent, RtcClientConnectionStatusChangedPayload, RtcEvents, RtcLocalStreamTrackAddedPayload, RtcLocalStreamTrackRemovedPayload, RtcManager, RtcManagerCreatedPayload, RtcStreamAddedPayload, ScreenshareStartedEvent, ScreenshareStoppedEvent, SendClientMetadataRequest, SignalClient, SignalEvents, SignalKnocker, SignalRequests, SocketConf, SocketManager, Spotlight, SpotlightAddedEvent, SpotlightRemovedEvent, StatsMonitorOptions, StatsMonitorState, StatsSubscription, TrackStats, TurnTransportProtocol, UpdatedDeviceInfo, UpdatedDevicesInfo, VideoEnableRequest, VideoEnableRequestedEvent, VideoEnabledEvent, ViewStats, ssrcStats };
|
package/dist/index.d.ts
CHANGED
|
@@ -256,8 +256,6 @@ declare class BandwidthTester extends EventEmitter {
|
|
|
256
256
|
|
|
257
257
|
declare function detectMicrophoneNotWorking(pc: any): any;
|
|
258
258
|
|
|
259
|
-
declare const MAXIMUM_TURN_BANDWIDTH = 1280;
|
|
260
|
-
declare const MAXIMUM_TURN_BANDWIDTH_UNLIMITED = -1;
|
|
261
259
|
declare const MEDIA_JITTER_BUFFER_TARGET = 400;
|
|
262
260
|
|
|
263
261
|
declare enum RtcEventNames {
|
|
@@ -486,7 +484,6 @@ declare class P2pRtcManager implements RtcManager {
|
|
|
486
484
|
isSfu: any;
|
|
487
485
|
}): boolean;
|
|
488
486
|
supportsScreenShareAudio(): boolean;
|
|
489
|
-
maybeRestrictRelayBandwidth(session: any): void;
|
|
490
487
|
addNewStream(streamId: string, stream: MediaStream, audioPaused: boolean, videoPaused: boolean, beforeEffectTracks?: CustomMediaStreamTrack[]): void;
|
|
491
488
|
replaceTrack(oldTrack: CustomMediaStreamTrack | null, newTrack: CustomMediaStreamTrack): Promise<any[]>;
|
|
492
489
|
disconnectAll(): void;
|
|
@@ -1254,7 +1251,6 @@ declare class Session {
|
|
|
1254
1251
|
totalRecv: number;
|
|
1255
1252
|
};
|
|
1256
1253
|
bandwidth: any;
|
|
1257
|
-
maximumTurnBandwidth: any;
|
|
1258
1254
|
pending: any[];
|
|
1259
1255
|
isOperationPending: boolean;
|
|
1260
1256
|
streamIds: any[];
|
|
@@ -1272,10 +1268,9 @@ declare class Session {
|
|
|
1272
1268
|
shouldAddLocalVideo: any;
|
|
1273
1269
|
signalingState: any;
|
|
1274
1270
|
srdComplete: any;
|
|
1275
|
-
constructor({ peerConnectionId, bandwidth,
|
|
1271
|
+
constructor({ peerConnectionId, bandwidth, deprioritizeH264Encoding, }: {
|
|
1276
1272
|
peerConnectionId: any;
|
|
1277
1273
|
bandwidth: any;
|
|
1278
|
-
maximumTurnBandwidth: any;
|
|
1279
1274
|
deprioritizeH264Encoding: any;
|
|
1280
1275
|
});
|
|
1281
1276
|
setAndGetPeerConnection({ clientId, constraints, peerConnectionConfig, shouldAddLocalVideo, }: {
|
|
@@ -1296,7 +1291,6 @@ declare class Session {
|
|
|
1296
1291
|
close(): void;
|
|
1297
1292
|
hasConnectedPeerConnection(): any;
|
|
1298
1293
|
replaceTrack(oldTrack: MediaStreamTrack, newTrack: MediaStreamTrack): any;
|
|
1299
|
-
maybeRestrictRelayBandwidth(): void;
|
|
1300
1294
|
changeBandwidth(bandwidth: any): void;
|
|
1301
1295
|
setAudioOnly(enable: boolean, excludedTrackIds?: any[]): void;
|
|
1302
1296
|
}
|
|
@@ -1331,8 +1325,6 @@ declare class SfuV2Parser {
|
|
|
1331
1325
|
};
|
|
1332
1326
|
}
|
|
1333
1327
|
|
|
1334
|
-
declare function isRelayed(pc: any): any;
|
|
1335
|
-
|
|
1336
1328
|
declare class VegaConnection extends EventEmitter$1 {
|
|
1337
1329
|
wsUrl: string;
|
|
1338
1330
|
protocol: string;
|
|
@@ -1808,5 +1800,5 @@ declare class RtcStream {
|
|
|
1808
1800
|
static getTypeFromId(id: string): string;
|
|
1809
1801
|
}
|
|
1810
1802
|
|
|
1811
|
-
export { ADDITIONAL_SCREEN_SHARE_SETTINGS, ADDITIONAL_SCREEN_SHARE_SETTINGS_VP9, AUDIO_SETTINGS, BandwidthTester, EVENTS, KNOCK_MESSAGES, KalmanFilter, Logger,
|
|
1803
|
+
export { ADDITIONAL_SCREEN_SHARE_SETTINGS, ADDITIONAL_SCREEN_SHARE_SETTINGS_VP9, AUDIO_SETTINGS, BandwidthTester, EVENTS, KNOCK_MESSAGES, KalmanFilter, Logger, MEDIA_JITTER_BUFFER_TARGET, NoDevicesError, P2pRtcManager, PROTOCOL_ERRORS, PROTOCOL_EVENTS, PROTOCOL_REQUESTS, PROTOCOL_RESPONSES, RELAY_MESSAGES, ReconnectManager, RtcEventNames, RtcManagerDispatcher, RtcStream, SCREEN_SHARE_SETTINGS, SCREEN_SHARE_SETTINGS_VP9, SCREEN_SHARE_SIMULCAST_SETTINGS, STREAM_TYPES, ServerSocket, Session, SfuV2Parser, TYPES, VIDEO_SETTINGS_HD, VIDEO_SETTINGS_SD, VIDEO_SETTINGS_VP9, VIDEO_SETTINGS_VP9_KEY, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH_KEY, VegaConnection, VegaMediaQualityMonitor, VegaRtcManager, addAbsCaptureTimeExtMap, addExtMap, assert, buildDeviceList, calculateStd, captureAudioSsrcMetrics, captureCandidatePairInfoMetrics, captureCommonSsrcMetrics, captureSsrcInfo, captureVideoSsrcMetrics, changeMediaDirection, cleanSdp, compareLocalDevices, createACFCalculator, createMicAnalyser, createWorker, deprioritizeH264, detectMicrophoneNotWorking, enumerate, external_stun_servers, filterMidExtension, filterMsidSemantic, fromLocation, generateByteString, getConstraints, getCurrentPeerConnections, getDeviceData, getDisplayMedia, getIssuesAndMetrics, getMediaConstraints, getMediaSettings, getMediasoupDevice, getNumFailedStatsReports, getNumFailedTrackSsrcLookups, getNumMissingTrackSsrcLookups, getPeerConnectionIndex, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isMobile, maybeRejectNoH264, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceSSRCs, replaceTracksInStream, _default as rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, sortCodecs, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, turnServerOverride, variance };
|
|
1812
1804
|
export type { AddSpotlightRequest, AudioEnableRequest, AudioEnableRequestedEvent, AudioEnabledEvent, BreakoutConfig, BreakoutGroupJoinedEvent, BreakoutSessionUpdatedEvent, CannotJoinUnclaimedRoomError, ChatMessage, ClientKickedEvent, ClientLeftEvent, ClientMetadataPayload, ClientMetadataReceivedEvent, ClientRole, ClientUnableToJoinEvent, CloudRecordingStartedEvent, Codec, Credentials, CustomMediaStreamTrack, ForbiddenError, ForbiddenErrorNames, GetConstraintsOptions, GetDeviceDataResult, GetMediaConstraintsOptions, GetStreamOptions, GetStreamResult, GetUpdatedDevicesResult, HostPresenceControlsError, IdentifyDeviceRequest, InternalServerError, IssuesAndMetricsByView, JoinRoomRequest, KnockAcceptedEvent, KnockRejectedEvent, KnockRoomRequest, KnockerLeftEvent, LiveTranscriptionStartedEvent, LiveTranscriptionStoppedEvent, MaxViewerLimitReachedError, NewClientEvent, OrganizationPlanExhaustedError, RemoveSpotlightRequest, RoleName, RoomConcurrencyControlsError, RoomFullError, RoomJoinedErrors, RoomJoinedEvent, RoomJoinedSuccess, RoomKnockedEvent, RoomLockedError, RoomLockedEvent, RoomMeetingTimeExhaustedError, RoomMode, RoomSessionEndedEvent, RtcClientConnectionStatusChangedPayload, RtcEvents, RtcLocalStreamTrackAddedPayload, RtcLocalStreamTrackRemovedPayload, RtcManager, RtcManagerCreatedPayload, RtcStreamAddedPayload, ScreenshareStartedEvent, ScreenshareStoppedEvent, SendClientMetadataRequest, SignalClient, SignalEvents, SignalKnocker, SignalRequests, SocketConf, SocketManager, Spotlight, SpotlightAddedEvent, SpotlightRemovedEvent, StatsMonitorOptions, StatsMonitorState, StatsSubscription, TrackStats, TurnTransportProtocol, UpdatedDeviceInfo, UpdatedDevicesInfo, VideoEnableRequest, VideoEnableRequestedEvent, VideoEnabledEvent, ViewStats, ssrcStats };
|
package/dist/index.mjs
CHANGED
|
@@ -1037,32 +1037,6 @@ function addAbsCaptureTimeExtMap(sdp) {
|
|
|
1037
1037
|
return addExtMap(sdp, absCaptureTimeUri, true, true);
|
|
1038
1038
|
}
|
|
1039
1039
|
|
|
1040
|
-
function isRelayed(pc) {
|
|
1041
|
-
return pc.getStats(null).then((result) => {
|
|
1042
|
-
let localCandidateType;
|
|
1043
|
-
let remoteCandidateType;
|
|
1044
|
-
result.forEach((report) => {
|
|
1045
|
-
if (report.type === "transport" && report.selectedCandidatePairId) {
|
|
1046
|
-
const transport = result.get(report.selectedCandidatePairId);
|
|
1047
|
-
if (!transport) {
|
|
1048
|
-
return;
|
|
1049
|
-
}
|
|
1050
|
-
localCandidateType = result.get(transport.localCandidateId).candidateType;
|
|
1051
|
-
remoteCandidateType = result.get(transport.remoteCandidateId).candidateType;
|
|
1052
|
-
return;
|
|
1053
|
-
}
|
|
1054
|
-
if (report.type === "candidate-pair" && report.selected) {
|
|
1055
|
-
localCandidateType = result.get(report.localCandidateId).candidateType;
|
|
1056
|
-
remoteCandidateType = result.get(report.remoteCandidateId).candidateType;
|
|
1057
|
-
}
|
|
1058
|
-
});
|
|
1059
|
-
return (localCandidateType === "relay" ||
|
|
1060
|
-
localCandidateType === "relayed" ||
|
|
1061
|
-
remoteCandidateType === "relay" ||
|
|
1062
|
-
remoteCandidateType === "relayed");
|
|
1063
|
-
});
|
|
1064
|
-
}
|
|
1065
|
-
|
|
1066
1040
|
function setVideoBandwidthUsingSetParameters(pc, bandwidth, logger = console) {
|
|
1067
1041
|
const sender = pc.getSenders().find((s) => s.track && s.track.kind === "video");
|
|
1068
1042
|
if (!sender) {
|
|
@@ -1086,15 +1060,11 @@ function setVideoBandwidthUsingSetParameters(pc, bandwidth, logger = console) {
|
|
|
1086
1060
|
});
|
|
1087
1061
|
}
|
|
1088
1062
|
|
|
1089
|
-
const MAXIMUM_TURN_BANDWIDTH = 1280;
|
|
1090
|
-
const MAXIMUM_TURN_BANDWIDTH_UNLIMITED = -1;
|
|
1091
|
-
const MEDIA_JITTER_BUFFER_TARGET = 400;
|
|
1092
|
-
|
|
1093
1063
|
var _a$5;
|
|
1094
1064
|
const adapter$5 = (_a$5 = adapterRaw.default) !== null && _a$5 !== void 0 ? _a$5 : adapterRaw;
|
|
1095
1065
|
const logger$a = new Logger();
|
|
1096
1066
|
class Session {
|
|
1097
|
-
constructor({ peerConnectionId, bandwidth,
|
|
1067
|
+
constructor({ peerConnectionId, bandwidth, deprioritizeH264Encoding, }) {
|
|
1098
1068
|
this.peerConnectionId = peerConnectionId;
|
|
1099
1069
|
this.relayCandidateSeen = false;
|
|
1100
1070
|
this.serverReflexiveCandidateSeen = false;
|
|
@@ -1111,7 +1081,6 @@ class Session {
|
|
|
1111
1081
|
totalRecv: 0,
|
|
1112
1082
|
};
|
|
1113
1083
|
this.bandwidth = bandwidth || 0;
|
|
1114
|
-
this.maximumTurnBandwidth = maximumTurnBandwidth;
|
|
1115
1084
|
this.pending = [];
|
|
1116
1085
|
this.isOperationPending = false;
|
|
1117
1086
|
this.streamIds = [];
|
|
@@ -1371,19 +1340,6 @@ class Session {
|
|
|
1371
1340
|
});
|
|
1372
1341
|
}
|
|
1373
1342
|
}
|
|
1374
|
-
maybeRestrictRelayBandwidth() {
|
|
1375
|
-
if (this.maximumTurnBandwidth === MAXIMUM_TURN_BANDWIDTH_UNLIMITED) {
|
|
1376
|
-
return;
|
|
1377
|
-
}
|
|
1378
|
-
if (!this.pc.getStats) {
|
|
1379
|
-
return;
|
|
1380
|
-
}
|
|
1381
|
-
isRelayed(this.pc).then((isRelayed) => {
|
|
1382
|
-
if (isRelayed && this.bandwidth === 0) {
|
|
1383
|
-
this.changeBandwidth(this.maximumTurnBandwidth);
|
|
1384
|
-
}
|
|
1385
|
-
});
|
|
1386
|
-
}
|
|
1387
1343
|
changeBandwidth(bandwidth) {
|
|
1388
1344
|
if (bandwidth === this.bandwidth) {
|
|
1389
1345
|
return;
|
|
@@ -1414,6 +1370,8 @@ class Session {
|
|
|
1414
1370
|
}
|
|
1415
1371
|
}
|
|
1416
1372
|
|
|
1373
|
+
const MEDIA_JITTER_BUFFER_TARGET = 400;
|
|
1374
|
+
|
|
1417
1375
|
var _a$4;
|
|
1418
1376
|
const adapter$4 = (_a$4 = adapterRaw.default) !== null && _a$4 !== void 0 ? _a$4 : adapterRaw;
|
|
1419
1377
|
function detectMicrophoneNotWorking(pc) {
|
|
@@ -3232,9 +3190,6 @@ class P2pRtcManager {
|
|
|
3232
3190
|
supportsScreenShareAudio() {
|
|
3233
3191
|
return true;
|
|
3234
3192
|
}
|
|
3235
|
-
maybeRestrictRelayBandwidth(session) {
|
|
3236
|
-
session.maybeRestrictRelayBandwidth();
|
|
3237
|
-
}
|
|
3238
3193
|
addNewStream(streamId, stream, audioPaused, videoPaused, beforeEffectTracks = []) {
|
|
3239
3194
|
if (stream === this.localStreams[streamId]) {
|
|
3240
3195
|
return;
|
|
@@ -3505,9 +3460,6 @@ class P2pRtcManager {
|
|
|
3505
3460
|
this.peerConnections[peerConnectionId] = session = new Session({
|
|
3506
3461
|
peerConnectionId,
|
|
3507
3462
|
bandwidth: initialBandwidth,
|
|
3508
|
-
maximumTurnBandwidth: this._features.unlimitedBandwidthWhenUsingRelayP2POn
|
|
3509
|
-
? MAXIMUM_TURN_BANDWIDTH_UNLIMITED
|
|
3510
|
-
: MAXIMUM_TURN_BANDWIDTH,
|
|
3511
3463
|
deprioritizeH264Encoding,
|
|
3512
3464
|
});
|
|
3513
3465
|
this.totalSessionsCreated++;
|
|
@@ -3612,9 +3564,6 @@ class P2pRtcManager {
|
|
|
3612
3564
|
(pc.iceConnectionState.match(/connected|completed/) ||
|
|
3613
3565
|
(browserName$1 === "chrome" && pc.localDescription && pc.localDescription.type === "answer"))) {
|
|
3614
3566
|
session.wasEverConnected = true;
|
|
3615
|
-
if (this._features.bandwidth !== "false") {
|
|
3616
|
-
this.maybeRestrictRelayBandwidth(session);
|
|
3617
|
-
}
|
|
3618
3567
|
}
|
|
3619
3568
|
if (this._isAudioOnlyMode) {
|
|
3620
3569
|
session.setAudioOnly(true, this._screenshareVideoTrackIds);
|
|
@@ -7998,4 +7947,4 @@ var RtcEventNames;
|
|
|
7998
7947
|
RtcEventNames["stream_added"] = "stream_added";
|
|
7999
7948
|
})(RtcEventNames || (RtcEventNames = {}));
|
|
8000
7949
|
|
|
8001
|
-
export { ADDITIONAL_SCREEN_SHARE_SETTINGS, ADDITIONAL_SCREEN_SHARE_SETTINGS_VP9, AUDIO_SETTINGS, BandwidthTester, EVENTS, KNOCK_MESSAGES, KalmanFilter, Logger,
|
|
7950
|
+
export { ADDITIONAL_SCREEN_SHARE_SETTINGS, ADDITIONAL_SCREEN_SHARE_SETTINGS_VP9, AUDIO_SETTINGS, BandwidthTester, EVENTS, KNOCK_MESSAGES, KalmanFilter, Logger, MEDIA_JITTER_BUFFER_TARGET, NoDevicesError, P2pRtcManager, PROTOCOL_ERRORS, PROTOCOL_EVENTS, PROTOCOL_REQUESTS, PROTOCOL_RESPONSES, RELAY_MESSAGES, ReconnectManager, RtcEventNames, RtcManagerDispatcher, RtcStream, SCREEN_SHARE_SETTINGS, SCREEN_SHARE_SETTINGS_VP9, SCREEN_SHARE_SIMULCAST_SETTINGS, STREAM_TYPES, ServerSocket, Session, SfuV2Parser, TYPES, VIDEO_SETTINGS_HD, VIDEO_SETTINGS_SD, VIDEO_SETTINGS_VP9, VIDEO_SETTINGS_VP9_KEY, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH_KEY, VegaConnection, VegaMediaQualityMonitor, VegaRtcManager, addAbsCaptureTimeExtMap, addExtMap, assert, buildDeviceList, calculateStd, captureAudioSsrcMetrics, captureCandidatePairInfoMetrics, captureCommonSsrcMetrics, captureSsrcInfo, captureVideoSsrcMetrics, changeMediaDirection, cleanSdp, compareLocalDevices, createACFCalculator, createMicAnalyser, createWorker, deprioritizeH264, detectMicrophoneNotWorking, enumerate, external_stun_servers, filterMidExtension, filterMsidSemantic, fromLocation, generateByteString, getConstraints, getCurrentPeerConnections, getDeviceData, getDisplayMedia, getIssuesAndMetrics, getMediaConstraints, getMediaSettings, getMediasoupDevice, getNumFailedStatsReports, getNumFailedTrackSsrcLookups, getNumMissingTrackSsrcLookups, getPeerConnectionIndex, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isMobile, maybeRejectNoH264, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceSSRCs, replaceTracksInStream, rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, sortCodecs, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, turnServerOverride, variance };
|
package/dist/legacy-esm.js
CHANGED
|
@@ -1037,32 +1037,6 @@ function addAbsCaptureTimeExtMap(sdp) {
|
|
|
1037
1037
|
return addExtMap(sdp, absCaptureTimeUri, true, true);
|
|
1038
1038
|
}
|
|
1039
1039
|
|
|
1040
|
-
function isRelayed(pc) {
|
|
1041
|
-
return pc.getStats(null).then((result) => {
|
|
1042
|
-
let localCandidateType;
|
|
1043
|
-
let remoteCandidateType;
|
|
1044
|
-
result.forEach((report) => {
|
|
1045
|
-
if (report.type === "transport" && report.selectedCandidatePairId) {
|
|
1046
|
-
const transport = result.get(report.selectedCandidatePairId);
|
|
1047
|
-
if (!transport) {
|
|
1048
|
-
return;
|
|
1049
|
-
}
|
|
1050
|
-
localCandidateType = result.get(transport.localCandidateId).candidateType;
|
|
1051
|
-
remoteCandidateType = result.get(transport.remoteCandidateId).candidateType;
|
|
1052
|
-
return;
|
|
1053
|
-
}
|
|
1054
|
-
if (report.type === "candidate-pair" && report.selected) {
|
|
1055
|
-
localCandidateType = result.get(report.localCandidateId).candidateType;
|
|
1056
|
-
remoteCandidateType = result.get(report.remoteCandidateId).candidateType;
|
|
1057
|
-
}
|
|
1058
|
-
});
|
|
1059
|
-
return (localCandidateType === "relay" ||
|
|
1060
|
-
localCandidateType === "relayed" ||
|
|
1061
|
-
remoteCandidateType === "relay" ||
|
|
1062
|
-
remoteCandidateType === "relayed");
|
|
1063
|
-
});
|
|
1064
|
-
}
|
|
1065
|
-
|
|
1066
1040
|
function setVideoBandwidthUsingSetParameters(pc, bandwidth, logger = console) {
|
|
1067
1041
|
const sender = pc.getSenders().find((s) => s.track && s.track.kind === "video");
|
|
1068
1042
|
if (!sender) {
|
|
@@ -1086,15 +1060,11 @@ function setVideoBandwidthUsingSetParameters(pc, bandwidth, logger = console) {
|
|
|
1086
1060
|
});
|
|
1087
1061
|
}
|
|
1088
1062
|
|
|
1089
|
-
const MAXIMUM_TURN_BANDWIDTH = 1280;
|
|
1090
|
-
const MAXIMUM_TURN_BANDWIDTH_UNLIMITED = -1;
|
|
1091
|
-
const MEDIA_JITTER_BUFFER_TARGET = 400;
|
|
1092
|
-
|
|
1093
1063
|
var _a$5;
|
|
1094
1064
|
const adapter$5 = (_a$5 = adapterRaw.default) !== null && _a$5 !== void 0 ? _a$5 : adapterRaw;
|
|
1095
1065
|
const logger$a = new Logger();
|
|
1096
1066
|
class Session {
|
|
1097
|
-
constructor({ peerConnectionId, bandwidth,
|
|
1067
|
+
constructor({ peerConnectionId, bandwidth, deprioritizeH264Encoding, }) {
|
|
1098
1068
|
this.peerConnectionId = peerConnectionId;
|
|
1099
1069
|
this.relayCandidateSeen = false;
|
|
1100
1070
|
this.serverReflexiveCandidateSeen = false;
|
|
@@ -1111,7 +1081,6 @@ class Session {
|
|
|
1111
1081
|
totalRecv: 0,
|
|
1112
1082
|
};
|
|
1113
1083
|
this.bandwidth = bandwidth || 0;
|
|
1114
|
-
this.maximumTurnBandwidth = maximumTurnBandwidth;
|
|
1115
1084
|
this.pending = [];
|
|
1116
1085
|
this.isOperationPending = false;
|
|
1117
1086
|
this.streamIds = [];
|
|
@@ -1371,19 +1340,6 @@ class Session {
|
|
|
1371
1340
|
});
|
|
1372
1341
|
}
|
|
1373
1342
|
}
|
|
1374
|
-
maybeRestrictRelayBandwidth() {
|
|
1375
|
-
if (this.maximumTurnBandwidth === MAXIMUM_TURN_BANDWIDTH_UNLIMITED) {
|
|
1376
|
-
return;
|
|
1377
|
-
}
|
|
1378
|
-
if (!this.pc.getStats) {
|
|
1379
|
-
return;
|
|
1380
|
-
}
|
|
1381
|
-
isRelayed(this.pc).then((isRelayed) => {
|
|
1382
|
-
if (isRelayed && this.bandwidth === 0) {
|
|
1383
|
-
this.changeBandwidth(this.maximumTurnBandwidth);
|
|
1384
|
-
}
|
|
1385
|
-
});
|
|
1386
|
-
}
|
|
1387
1343
|
changeBandwidth(bandwidth) {
|
|
1388
1344
|
if (bandwidth === this.bandwidth) {
|
|
1389
1345
|
return;
|
|
@@ -1414,6 +1370,8 @@ class Session {
|
|
|
1414
1370
|
}
|
|
1415
1371
|
}
|
|
1416
1372
|
|
|
1373
|
+
const MEDIA_JITTER_BUFFER_TARGET = 400;
|
|
1374
|
+
|
|
1417
1375
|
var _a$4;
|
|
1418
1376
|
const adapter$4 = (_a$4 = adapterRaw.default) !== null && _a$4 !== void 0 ? _a$4 : adapterRaw;
|
|
1419
1377
|
function detectMicrophoneNotWorking(pc) {
|
|
@@ -3232,9 +3190,6 @@ class P2pRtcManager {
|
|
|
3232
3190
|
supportsScreenShareAudio() {
|
|
3233
3191
|
return true;
|
|
3234
3192
|
}
|
|
3235
|
-
maybeRestrictRelayBandwidth(session) {
|
|
3236
|
-
session.maybeRestrictRelayBandwidth();
|
|
3237
|
-
}
|
|
3238
3193
|
addNewStream(streamId, stream, audioPaused, videoPaused, beforeEffectTracks = []) {
|
|
3239
3194
|
if (stream === this.localStreams[streamId]) {
|
|
3240
3195
|
return;
|
|
@@ -3505,9 +3460,6 @@ class P2pRtcManager {
|
|
|
3505
3460
|
this.peerConnections[peerConnectionId] = session = new Session({
|
|
3506
3461
|
peerConnectionId,
|
|
3507
3462
|
bandwidth: initialBandwidth,
|
|
3508
|
-
maximumTurnBandwidth: this._features.unlimitedBandwidthWhenUsingRelayP2POn
|
|
3509
|
-
? MAXIMUM_TURN_BANDWIDTH_UNLIMITED
|
|
3510
|
-
: MAXIMUM_TURN_BANDWIDTH,
|
|
3511
3463
|
deprioritizeH264Encoding,
|
|
3512
3464
|
});
|
|
3513
3465
|
this.totalSessionsCreated++;
|
|
@@ -3612,9 +3564,6 @@ class P2pRtcManager {
|
|
|
3612
3564
|
(pc.iceConnectionState.match(/connected|completed/) ||
|
|
3613
3565
|
(browserName$1 === "chrome" && pc.localDescription && pc.localDescription.type === "answer"))) {
|
|
3614
3566
|
session.wasEverConnected = true;
|
|
3615
|
-
if (this._features.bandwidth !== "false") {
|
|
3616
|
-
this.maybeRestrictRelayBandwidth(session);
|
|
3617
|
-
}
|
|
3618
3567
|
}
|
|
3619
3568
|
if (this._isAudioOnlyMode) {
|
|
3620
3569
|
session.setAudioOnly(true, this._screenshareVideoTrackIds);
|
|
@@ -7998,5 +7947,5 @@ var RtcEventNames;
|
|
|
7998
7947
|
RtcEventNames["stream_added"] = "stream_added";
|
|
7999
7948
|
})(RtcEventNames || (RtcEventNames = {}));
|
|
8000
7949
|
|
|
8001
|
-
export { ADDITIONAL_SCREEN_SHARE_SETTINGS, ADDITIONAL_SCREEN_SHARE_SETTINGS_VP9, AUDIO_SETTINGS, BandwidthTester, EVENTS, KNOCK_MESSAGES, KalmanFilter, Logger,
|
|
7950
|
+
export { ADDITIONAL_SCREEN_SHARE_SETTINGS, ADDITIONAL_SCREEN_SHARE_SETTINGS_VP9, AUDIO_SETTINGS, BandwidthTester, EVENTS, KNOCK_MESSAGES, KalmanFilter, Logger, MEDIA_JITTER_BUFFER_TARGET, NoDevicesError, P2pRtcManager, PROTOCOL_ERRORS, PROTOCOL_EVENTS, PROTOCOL_REQUESTS, PROTOCOL_RESPONSES, RELAY_MESSAGES, ReconnectManager, RtcEventNames, RtcManagerDispatcher, RtcStream, SCREEN_SHARE_SETTINGS, SCREEN_SHARE_SETTINGS_VP9, SCREEN_SHARE_SIMULCAST_SETTINGS, STREAM_TYPES, ServerSocket, Session, SfuV2Parser, TYPES, VIDEO_SETTINGS_HD, VIDEO_SETTINGS_SD, VIDEO_SETTINGS_VP9, VIDEO_SETTINGS_VP9_KEY, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH_KEY, VegaConnection, VegaMediaQualityMonitor, VegaRtcManager, addAbsCaptureTimeExtMap, addExtMap, assert, buildDeviceList, calculateStd, captureAudioSsrcMetrics, captureCandidatePairInfoMetrics, captureCommonSsrcMetrics, captureSsrcInfo, captureVideoSsrcMetrics, changeMediaDirection, cleanSdp, compareLocalDevices, createACFCalculator, createMicAnalyser, createWorker, deprioritizeH264, detectMicrophoneNotWorking, enumerate, external_stun_servers, filterMidExtension, filterMsidSemantic, fromLocation, generateByteString, getConstraints, getCurrentPeerConnections, getDeviceData, getDisplayMedia, getIssuesAndMetrics, getMediaConstraints, getMediaSettings, getMediasoupDevice, getNumFailedStatsReports, getNumFailedTrackSsrcLookups, getNumMissingTrackSsrcLookups, getPeerConnectionIndex, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isMobile, maybeRejectNoH264, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceSSRCs, replaceTracksInStream, rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, sortCodecs, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, turnServerOverride, variance };
|
|
8002
7951
|
//# sourceMappingURL=legacy-esm.js.map
|