@whereby.com/media 2.6.6 → 2.6.8
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 +42 -30
- package/dist/index.d.cts +27 -14
- package/dist/index.d.mts +27 -14
- package/dist/index.d.ts +27 -14
- package/dist/index.mjs +42 -30
- package/dist/legacy-esm.js +42 -30
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2309,8 +2309,6 @@ class Session {
|
|
|
2309
2309
|
const desc = { type: message.type, sdp };
|
|
2310
2310
|
return this._setRemoteDescription(desc).then(() => {
|
|
2311
2311
|
return setVideoBandwidthUsingSetParameters(this.pc, this.bandwidth);
|
|
2312
|
-
}, (e) => {
|
|
2313
|
-
logger$7.warn("Could not set remote description from remote answer: ", e);
|
|
2314
2312
|
});
|
|
2315
2313
|
}
|
|
2316
2314
|
addIceCandidate(candidate) {
|
|
@@ -2602,11 +2600,6 @@ class RtcStream {
|
|
|
2602
2600
|
var rtcManagerEvents = {
|
|
2603
2601
|
CAMERA_NOT_WORKING: "camera_not_working",
|
|
2604
2602
|
CONNECTION_BLOCKED_BY_NETWORK: "connection_blocked_by_network",
|
|
2605
|
-
ICE_IPV6_SEEN: "ice_ipv6_seen",
|
|
2606
|
-
ICE_MDNS_SEEN: "ice_mdns_seen",
|
|
2607
|
-
ICE_NO_PUBLIC_IP_GATHERED: "ice_no_public_ip_gathered",
|
|
2608
|
-
ICE_NO_PUBLIC_IP_GATHERED_3SEC: "ice_no_public_ip_gathered_3sec",
|
|
2609
|
-
ICE_RESTART: "ice_restart",
|
|
2610
2603
|
MICROPHONE_NOT_WORKING: "microphone_not_working",
|
|
2611
2604
|
MICROPHONE_STOPPED_WORKING: "microphone_stopped_working",
|
|
2612
2605
|
CAMERA_STOPPED_WORKING: "camera_stopped_working",
|
|
@@ -2616,9 +2609,6 @@ var rtcManagerEvents = {
|
|
|
2616
2609
|
SFU_CONNECTION_INFO: "sfu_connection_info",
|
|
2617
2610
|
COLOCATION_SPEAKER: "colocation_speaker",
|
|
2618
2611
|
DOMINANT_SPEAKER: "dominant_speaker",
|
|
2619
|
-
PC_SLD_FAILURE: "pc_sld_failure",
|
|
2620
|
-
PC_ON_ANSWER_FAILURE: "pc_on_answer_failure",
|
|
2621
|
-
PC_ON_OFFER_FAILURE: "pc_on_offer_failure",
|
|
2622
2612
|
};
|
|
2623
2613
|
|
|
2624
2614
|
var _a$2, _b$1, _c;
|
|
@@ -2661,10 +2651,12 @@ class P2pRtcManager {
|
|
|
2661
2651
|
this._audioTrackOnEnded = () => {
|
|
2662
2652
|
rtcStats.sendEvent("audio_ended", { unloading: unloading$1 });
|
|
2663
2653
|
this._emit(rtcManagerEvents.MICROPHONE_STOPPED_WORKING, {});
|
|
2654
|
+
this.analytics.micTrackEndedCount++;
|
|
2664
2655
|
};
|
|
2665
2656
|
this._videoTrackOnEnded = () => {
|
|
2666
2657
|
rtcStats.sendEvent("video_ended", { unloading: unloading$1 });
|
|
2667
2658
|
this._emit(rtcManagerEvents.CAMERA_STOPPED_WORKING, {});
|
|
2659
|
+
this.analytics.camTrackEndedCount++;
|
|
2668
2660
|
};
|
|
2669
2661
|
this._updateAndScheduleMediaServersRefresh({
|
|
2670
2662
|
sfuServer,
|
|
@@ -2676,6 +2668,20 @@ class P2pRtcManager {
|
|
|
2676
2668
|
this.analytics = {
|
|
2677
2669
|
P2PReplaceTrackNoPC: 0,
|
|
2678
2670
|
P2PNonErrorRejectionValueGUMError: 0,
|
|
2671
|
+
numNewPc: 0,
|
|
2672
|
+
numIceConnected: 0,
|
|
2673
|
+
numIceRestart: 0,
|
|
2674
|
+
numIceNoPublicIpGathered: 0,
|
|
2675
|
+
numIceNoPublicIpGatheredIn3sec: 0,
|
|
2676
|
+
numIceIpv6Seen: 0,
|
|
2677
|
+
numIceIpv6TeredoSeen: 0,
|
|
2678
|
+
numIceIpv6SixToFour: 0,
|
|
2679
|
+
numIceMdnsSeen: 0,
|
|
2680
|
+
micTrackEndedCount: 0,
|
|
2681
|
+
camTrackEndedCount: 0,
|
|
2682
|
+
numPcSldFailure: 0,
|
|
2683
|
+
numPcOnAnswerFailure: 0,
|
|
2684
|
+
numPcOnOfferFailure: 0,
|
|
2679
2685
|
};
|
|
2680
2686
|
}
|
|
2681
2687
|
numberOfPeerconnections() {
|
|
@@ -2804,7 +2810,7 @@ class P2pRtcManager {
|
|
|
2804
2810
|
message: this._transformOutgoingSdp(answer),
|
|
2805
2811
|
});
|
|
2806
2812
|
})).catch) === null || _b === void 0 ? void 0 : _b.call(_a, (e) => {
|
|
2807
|
-
this.
|
|
2813
|
+
this.analytics.numPcOnOfferFailure++;
|
|
2808
2814
|
});
|
|
2809
2815
|
}),
|
|
2810
2816
|
this._serverSocket.on(RELAY_MESSAGES.SDP_ANSWER, (data) => {
|
|
@@ -2816,7 +2822,8 @@ class P2pRtcManager {
|
|
|
2816
2822
|
}
|
|
2817
2823
|
const answer = this._transformIncomingSdp(data.message, session.pc);
|
|
2818
2824
|
(_b = (_a = session.handleAnswer(answer)) === null || _a === void 0 ? void 0 : _a.catch) === null || _b === void 0 ? void 0 : _b.call(_a, (e) => {
|
|
2819
|
-
|
|
2825
|
+
logger$6.warn("Could not set remote description from remote answer: ", e);
|
|
2826
|
+
this.analytics.numPcOnAnswerFailure++;
|
|
2820
2827
|
});
|
|
2821
2828
|
}),
|
|
2822
2829
|
this._serverSocket.on(PROTOCOL_RESPONSES.ROOM_JOINED, (payload) => {
|
|
@@ -2905,6 +2912,9 @@ class P2pRtcManager {
|
|
|
2905
2912
|
previous: previousStatus,
|
|
2906
2913
|
});
|
|
2907
2914
|
}, 0);
|
|
2915
|
+
if (newStatus === TYPES.CONNECTION_SUCCESSFUL) {
|
|
2916
|
+
this.analytics.numIceConnected++;
|
|
2917
|
+
}
|
|
2908
2918
|
}
|
|
2909
2919
|
_setJitterBufferTarget(pc) {
|
|
2910
2920
|
try {
|
|
@@ -3019,6 +3029,7 @@ class P2pRtcManager {
|
|
|
3019
3029
|
clientId,
|
|
3020
3030
|
});
|
|
3021
3031
|
setTimeout(() => this._emit(rtcManagerEvents.NEW_PC), 0);
|
|
3032
|
+
this.analytics.numNewPc++;
|
|
3022
3033
|
pc.ontrack = (event) => {
|
|
3023
3034
|
const stream = event.streams[0];
|
|
3024
3035
|
if (stream.id === "default" && stream.getAudioTracks().length === 0) {
|
|
@@ -3286,10 +3297,10 @@ class P2pRtcManager {
|
|
|
3286
3297
|
session.serverReflexiveCandidateSeen = false;
|
|
3287
3298
|
session.publicHostCandidateSeen = false;
|
|
3288
3299
|
session.ipv6HostCandidateSeen = false;
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
this.
|
|
3300
|
+
session.ipv6HostCandidateTeredoSeen = false;
|
|
3301
|
+
session.ipv6HostCandidate6to4Seen = false;
|
|
3302
|
+
session.mdnsHostCandidateSeen = false;
|
|
3303
|
+
this.analytics.numIceRestart++;
|
|
3293
3304
|
this._negotiatePeerConnection(clientId, session, Object.assign({}, this.offerOptions, { iceRestart: true }));
|
|
3294
3305
|
}
|
|
3295
3306
|
}
|
|
@@ -3361,7 +3372,7 @@ class P2pRtcManager {
|
|
|
3361
3372
|
pc.setLocalDescription(offer)
|
|
3362
3373
|
.catch((e) => {
|
|
3363
3374
|
logger$6.warn("RTCPeerConnection.setLocalDescription() failed with local offer", e);
|
|
3364
|
-
this.
|
|
3375
|
+
this.analytics.numPcSldFailure++;
|
|
3365
3376
|
throw e;
|
|
3366
3377
|
})
|
|
3367
3378
|
.then(() => {
|
|
@@ -3443,7 +3454,7 @@ class P2pRtcManager {
|
|
|
3443
3454
|
!session.relayCandidateSeen &&
|
|
3444
3455
|
!session.serverReflexiveCandidateSeen) {
|
|
3445
3456
|
if (pc.iceConnectionState !== "connected" || pc.iceConnectionState !== "completed")
|
|
3446
|
-
this.
|
|
3457
|
+
this.analytics.numIceNoPublicIpGatheredIn3sec++;
|
|
3447
3458
|
}
|
|
3448
3459
|
}, ICE_PUBLIC_IP_GATHERING_TIMEOUT);
|
|
3449
3460
|
break;
|
|
@@ -3491,15 +3502,11 @@ class P2pRtcManager {
|
|
|
3491
3502
|
}
|
|
3492
3503
|
break;
|
|
3493
3504
|
case "srflx":
|
|
3494
|
-
|
|
3495
|
-
session.serverReflexiveCandidateSeen = true;
|
|
3496
|
-
}
|
|
3505
|
+
session.serverReflexiveCandidateSeen = true;
|
|
3497
3506
|
break;
|
|
3498
3507
|
case "relay":
|
|
3499
3508
|
case "relayed":
|
|
3500
|
-
|
|
3501
|
-
session.relayCandidateSeen = true;
|
|
3502
|
-
}
|
|
3509
|
+
session.relayCandidateSeen = true;
|
|
3503
3510
|
break;
|
|
3504
3511
|
}
|
|
3505
3512
|
this._emitServerEvent(RELAY_MESSAGES.ICE_CANDIDATE, {
|
|
@@ -3516,16 +3523,17 @@ class P2pRtcManager {
|
|
|
3516
3523
|
!session.serverReflexiveCandidateSeen &&
|
|
3517
3524
|
pc.iceConnectionState !== "connected" &&
|
|
3518
3525
|
pc.iceConnectionState !== "completed") {
|
|
3519
|
-
this.
|
|
3526
|
+
this.analytics.numIceNoPublicIpGathered++;
|
|
3520
3527
|
}
|
|
3521
3528
|
if (session.ipv6HostCandidateSeen) {
|
|
3522
|
-
this.
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3529
|
+
this.analytics.numIceIpv6Seen++;
|
|
3530
|
+
if (session.ipv6HostCandidate6to4Seen)
|
|
3531
|
+
this.analytics.numIceIpv6SixToFour++;
|
|
3532
|
+
if (session.ipv6HostCandidateTeredoSeen)
|
|
3533
|
+
this.analytics.numIceIpv6TeredoSeen++;
|
|
3526
3534
|
}
|
|
3527
3535
|
if (session.mdnsHostCandidateSeen)
|
|
3528
|
-
this.
|
|
3536
|
+
this.analytics.numIceMdnsSeen++;
|
|
3529
3537
|
}
|
|
3530
3538
|
};
|
|
3531
3539
|
pc.onnegotiationneeded = () => {
|
|
@@ -4541,10 +4549,12 @@ class VegaRtcManager {
|
|
|
4541
4549
|
this._audioTrackOnEnded = () => {
|
|
4542
4550
|
rtcStats.sendEvent("audio_ended", { unloading });
|
|
4543
4551
|
this._emitToPWA(rtcManagerEvents.MICROPHONE_STOPPED_WORKING, {});
|
|
4552
|
+
this.analytics.micTrackEndedCount++;
|
|
4544
4553
|
};
|
|
4545
4554
|
this._videoTrackOnEnded = () => {
|
|
4546
4555
|
rtcStats.sendEvent("video_ended", { unloading });
|
|
4547
4556
|
this._emitToPWA(rtcManagerEvents.CAMERA_STOPPED_WORKING, {});
|
|
4557
|
+
this.analytics.camTrackEndedCount++;
|
|
4548
4558
|
};
|
|
4549
4559
|
this._updateAndScheduleMediaServersRefresh({
|
|
4550
4560
|
sfuServer,
|
|
@@ -4571,6 +4581,8 @@ class VegaRtcManager {
|
|
|
4571
4581
|
vegaIceRestartMissingTransport: 0,
|
|
4572
4582
|
vegaIceRestartWrongTransportId: 0,
|
|
4573
4583
|
vegaNonErrorRejectionValueGUMError: 0,
|
|
4584
|
+
micTrackEndedCount: 0,
|
|
4585
|
+
camTrackEndedCount: 0,
|
|
4574
4586
|
};
|
|
4575
4587
|
}
|
|
4576
4588
|
_updateAndScheduleMediaServersRefresh({ iceServers, turnServers, sfuServer, sfuServers, mediaserverConfigTtlSeconds, }) {
|
package/dist/index.d.cts
CHANGED
|
@@ -381,6 +381,14 @@ type RtcEvents = {
|
|
|
381
381
|
remote_stream_track_added: void;
|
|
382
382
|
remote_stream_track_removed: void;
|
|
383
383
|
};
|
|
384
|
+
type SDPOfferRelayMessage = {
|
|
385
|
+
clientId: string;
|
|
386
|
+
message: RTCSessionDescription;
|
|
387
|
+
};
|
|
388
|
+
type SDPAnswerRelayMessage = {
|
|
389
|
+
clientId: string;
|
|
390
|
+
message: RTCSessionDescription;
|
|
391
|
+
};
|
|
384
392
|
type GetMediaConstraintsOptions = {
|
|
385
393
|
disableAEC: boolean;
|
|
386
394
|
disableAGC: boolean;
|
|
@@ -1081,6 +1089,20 @@ declare function fromLocation({ host, protocol }?: {
|
|
|
1081
1089
|
type P2PAnalytics = {
|
|
1082
1090
|
P2PReplaceTrackNoPC: number;
|
|
1083
1091
|
P2PNonErrorRejectionValueGUMError: number;
|
|
1092
|
+
numNewPc: number;
|
|
1093
|
+
numIceConnected: number;
|
|
1094
|
+
numIceRestart: number;
|
|
1095
|
+
numIceNoPublicIpGathered: number;
|
|
1096
|
+
numIceNoPublicIpGatheredIn3sec: number;
|
|
1097
|
+
numIceIpv6Seen: number;
|
|
1098
|
+
numIceIpv6TeredoSeen: number;
|
|
1099
|
+
numIceIpv6SixToFour: number;
|
|
1100
|
+
numIceMdnsSeen: number;
|
|
1101
|
+
micTrackEndedCount: number;
|
|
1102
|
+
camTrackEndedCount: number;
|
|
1103
|
+
numPcOnAnswerFailure: number;
|
|
1104
|
+
numPcOnOfferFailure: number;
|
|
1105
|
+
numPcSldFailure: number;
|
|
1084
1106
|
};
|
|
1085
1107
|
type P2PAnalyticMetric = keyof P2PAnalytics;
|
|
1086
1108
|
type P2PIncrementAnalyticMetric = (metric: P2PAnalyticMetric) => void;
|
|
@@ -1113,9 +1135,6 @@ declare class P2pRtcManager implements RtcManager {
|
|
|
1113
1135
|
_mediaserverConfigTtlSeconds: any;
|
|
1114
1136
|
_fetchMediaServersTimer: any;
|
|
1115
1137
|
_wasScreenSharing: any;
|
|
1116
|
-
ipv6HostCandidateTeredoSeen: any;
|
|
1117
|
-
ipv6HostCandidate6to4Seen: any;
|
|
1118
|
-
mdnsHostCandidateSeen: any;
|
|
1119
1138
|
_stoppedVideoTrack: any;
|
|
1120
1139
|
icePublicIPGatheringTimeoutID: any;
|
|
1121
1140
|
_videoTrackBeingMonitored?: CustomMediaStreamTrack;
|
|
@@ -1241,11 +1260,6 @@ declare class RtcManagerDispatcher {
|
|
|
1241
1260
|
declare const _default: {
|
|
1242
1261
|
CAMERA_NOT_WORKING: string;
|
|
1243
1262
|
CONNECTION_BLOCKED_BY_NETWORK: string;
|
|
1244
|
-
ICE_IPV6_SEEN: string;
|
|
1245
|
-
ICE_MDNS_SEEN: string;
|
|
1246
|
-
ICE_NO_PUBLIC_IP_GATHERED: string;
|
|
1247
|
-
ICE_NO_PUBLIC_IP_GATHERED_3SEC: string;
|
|
1248
|
-
ICE_RESTART: string;
|
|
1249
1263
|
MICROPHONE_NOT_WORKING: string;
|
|
1250
1264
|
MICROPHONE_STOPPED_WORKING: string;
|
|
1251
1265
|
CAMERA_STOPPED_WORKING: string;
|
|
@@ -1255,9 +1269,6 @@ declare const _default: {
|
|
|
1255
1269
|
SFU_CONNECTION_INFO: string;
|
|
1256
1270
|
COLOCATION_SPEAKER: string;
|
|
1257
1271
|
DOMINANT_SPEAKER: string;
|
|
1258
|
-
PC_SLD_FAILURE: string;
|
|
1259
|
-
PC_ON_ANSWER_FAILURE: string;
|
|
1260
|
-
PC_ON_OFFER_FAILURE: string;
|
|
1261
1272
|
};
|
|
1262
1273
|
|
|
1263
1274
|
declare function setVideoBandwidthUsingSetParameters(pc: any, bandwidth: any, logger?: any): any;
|
|
@@ -1338,8 +1349,8 @@ declare class Session {
|
|
|
1338
1349
|
removeTrack(track: MediaStreamTrack): void;
|
|
1339
1350
|
removeStream(stream: MediaStream): void;
|
|
1340
1351
|
_setRemoteDescription(desc: any): any;
|
|
1341
|
-
handleOffer(message:
|
|
1342
|
-
handleAnswer(message:
|
|
1352
|
+
handleOffer(message: RTCSessionDescription): any;
|
|
1353
|
+
handleAnswer(message: RTCSessionDescription): any;
|
|
1343
1354
|
addIceCandidate(candidate: any): void;
|
|
1344
1355
|
canModifyPeerConnection(): boolean;
|
|
1345
1356
|
close(): void;
|
|
@@ -1502,6 +1513,8 @@ type VegaAnalytics = {
|
|
|
1502
1513
|
vegaIceRestartMissingTransport: number;
|
|
1503
1514
|
vegaIceRestartWrongTransportId: number;
|
|
1504
1515
|
vegaNonErrorRejectionValueGUMError: number;
|
|
1516
|
+
micTrackEndedCount: number;
|
|
1517
|
+
camTrackEndedCount: number;
|
|
1505
1518
|
};
|
|
1506
1519
|
|
|
1507
1520
|
type MediaStreamWhichMayHaveInboundId = MediaStream & { inboundId?: string };
|
|
@@ -1874,4 +1887,4 @@ declare class RtcStream {
|
|
|
1874
1887
|
}
|
|
1875
1888
|
|
|
1876
1889
|
export { ADDITIONAL_SCREEN_SHARE_SETTINGS, 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_SIMULCAST_SETTINGS, STREAM_TYPES, ServerSocket, Session, SfuV2Parser, TYPES, VIDEO_SETTINGS_HD, VIDEO_SETTINGS_SD, VIDEO_SETTINGS_VP9, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH, 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, getMediasoupDeviceAsync, getNumFailedStatsReports, getNumFailedTrackSsrcLookups, getNumMissingTrackSsrcLookups, getPeerConnectionIndex, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isMobile, issueDetectorOrMetricEnabled, maybeRejectNoH264, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceSSRCs, replaceTracksInStream, _default as rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, sortCodecs, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, turnServerOverride, variance };
|
|
1877
|
-
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, InvalidAssistantKeyError, IssuesAndMetricsByView, JoinRoomRequest, KnockAcceptedEvent, KnockRejectedEvent, KnockRoomRequest, KnockerLeftEvent, LiveTranscriptionStartedEvent, LiveTranscriptionStoppedEvent, MaxViewerLimitReachedError, Metric, NewClientEvent, OrganizationAssistantNotEnabledError, OrganizationAssistantNotFoundError, 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, TurnTransportProtocol, UpdatedDeviceInfo, UpdatedDevicesInfo, VideoEnableRequest, VideoEnableRequestedEvent, VideoEnabledEvent };
|
|
1890
|
+
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, InvalidAssistantKeyError, IssuesAndMetricsByView, JoinRoomRequest, KnockAcceptedEvent, KnockRejectedEvent, KnockRoomRequest, KnockerLeftEvent, LiveTranscriptionStartedEvent, LiveTranscriptionStoppedEvent, MaxViewerLimitReachedError, Metric, NewClientEvent, OrganizationAssistantNotEnabledError, OrganizationAssistantNotFoundError, OrganizationPlanExhaustedError, RemoveSpotlightRequest, RoleName, RoomConcurrencyControlsError, RoomFullError, RoomJoinedErrors, RoomJoinedEvent, RoomJoinedSuccess, RoomKnockedEvent, RoomLockedError, RoomLockedEvent, RoomMeetingTimeExhaustedError, RoomMode, RoomSessionEndedEvent, RtcClientConnectionStatusChangedPayload, RtcEvents, RtcLocalStreamTrackAddedPayload, RtcLocalStreamTrackRemovedPayload, RtcManager, RtcManagerCreatedPayload, RtcStreamAddedPayload, SDPAnswerRelayMessage, SDPOfferRelayMessage, ScreenshareStartedEvent, ScreenshareStoppedEvent, SendClientMetadataRequest, SignalClient, SignalEvents, SignalKnocker, SignalRequests, SocketConf, SocketManager, Spotlight, SpotlightAddedEvent, SpotlightRemovedEvent, StatsMonitorOptions, StatsMonitorState, StatsSubscription, TurnTransportProtocol, UpdatedDeviceInfo, UpdatedDevicesInfo, VideoEnableRequest, VideoEnableRequestedEvent, VideoEnabledEvent };
|
package/dist/index.d.mts
CHANGED
|
@@ -381,6 +381,14 @@ type RtcEvents = {
|
|
|
381
381
|
remote_stream_track_added: void;
|
|
382
382
|
remote_stream_track_removed: void;
|
|
383
383
|
};
|
|
384
|
+
type SDPOfferRelayMessage = {
|
|
385
|
+
clientId: string;
|
|
386
|
+
message: RTCSessionDescription;
|
|
387
|
+
};
|
|
388
|
+
type SDPAnswerRelayMessage = {
|
|
389
|
+
clientId: string;
|
|
390
|
+
message: RTCSessionDescription;
|
|
391
|
+
};
|
|
384
392
|
type GetMediaConstraintsOptions = {
|
|
385
393
|
disableAEC: boolean;
|
|
386
394
|
disableAGC: boolean;
|
|
@@ -1081,6 +1089,20 @@ declare function fromLocation({ host, protocol }?: {
|
|
|
1081
1089
|
type P2PAnalytics = {
|
|
1082
1090
|
P2PReplaceTrackNoPC: number;
|
|
1083
1091
|
P2PNonErrorRejectionValueGUMError: number;
|
|
1092
|
+
numNewPc: number;
|
|
1093
|
+
numIceConnected: number;
|
|
1094
|
+
numIceRestart: number;
|
|
1095
|
+
numIceNoPublicIpGathered: number;
|
|
1096
|
+
numIceNoPublicIpGatheredIn3sec: number;
|
|
1097
|
+
numIceIpv6Seen: number;
|
|
1098
|
+
numIceIpv6TeredoSeen: number;
|
|
1099
|
+
numIceIpv6SixToFour: number;
|
|
1100
|
+
numIceMdnsSeen: number;
|
|
1101
|
+
micTrackEndedCount: number;
|
|
1102
|
+
camTrackEndedCount: number;
|
|
1103
|
+
numPcOnAnswerFailure: number;
|
|
1104
|
+
numPcOnOfferFailure: number;
|
|
1105
|
+
numPcSldFailure: number;
|
|
1084
1106
|
};
|
|
1085
1107
|
type P2PAnalyticMetric = keyof P2PAnalytics;
|
|
1086
1108
|
type P2PIncrementAnalyticMetric = (metric: P2PAnalyticMetric) => void;
|
|
@@ -1113,9 +1135,6 @@ declare class P2pRtcManager implements RtcManager {
|
|
|
1113
1135
|
_mediaserverConfigTtlSeconds: any;
|
|
1114
1136
|
_fetchMediaServersTimer: any;
|
|
1115
1137
|
_wasScreenSharing: any;
|
|
1116
|
-
ipv6HostCandidateTeredoSeen: any;
|
|
1117
|
-
ipv6HostCandidate6to4Seen: any;
|
|
1118
|
-
mdnsHostCandidateSeen: any;
|
|
1119
1138
|
_stoppedVideoTrack: any;
|
|
1120
1139
|
icePublicIPGatheringTimeoutID: any;
|
|
1121
1140
|
_videoTrackBeingMonitored?: CustomMediaStreamTrack;
|
|
@@ -1241,11 +1260,6 @@ declare class RtcManagerDispatcher {
|
|
|
1241
1260
|
declare const _default: {
|
|
1242
1261
|
CAMERA_NOT_WORKING: string;
|
|
1243
1262
|
CONNECTION_BLOCKED_BY_NETWORK: string;
|
|
1244
|
-
ICE_IPV6_SEEN: string;
|
|
1245
|
-
ICE_MDNS_SEEN: string;
|
|
1246
|
-
ICE_NO_PUBLIC_IP_GATHERED: string;
|
|
1247
|
-
ICE_NO_PUBLIC_IP_GATHERED_3SEC: string;
|
|
1248
|
-
ICE_RESTART: string;
|
|
1249
1263
|
MICROPHONE_NOT_WORKING: string;
|
|
1250
1264
|
MICROPHONE_STOPPED_WORKING: string;
|
|
1251
1265
|
CAMERA_STOPPED_WORKING: string;
|
|
@@ -1255,9 +1269,6 @@ declare const _default: {
|
|
|
1255
1269
|
SFU_CONNECTION_INFO: string;
|
|
1256
1270
|
COLOCATION_SPEAKER: string;
|
|
1257
1271
|
DOMINANT_SPEAKER: string;
|
|
1258
|
-
PC_SLD_FAILURE: string;
|
|
1259
|
-
PC_ON_ANSWER_FAILURE: string;
|
|
1260
|
-
PC_ON_OFFER_FAILURE: string;
|
|
1261
1272
|
};
|
|
1262
1273
|
|
|
1263
1274
|
declare function setVideoBandwidthUsingSetParameters(pc: any, bandwidth: any, logger?: any): any;
|
|
@@ -1338,8 +1349,8 @@ declare class Session {
|
|
|
1338
1349
|
removeTrack(track: MediaStreamTrack): void;
|
|
1339
1350
|
removeStream(stream: MediaStream): void;
|
|
1340
1351
|
_setRemoteDescription(desc: any): any;
|
|
1341
|
-
handleOffer(message:
|
|
1342
|
-
handleAnswer(message:
|
|
1352
|
+
handleOffer(message: RTCSessionDescription): any;
|
|
1353
|
+
handleAnswer(message: RTCSessionDescription): any;
|
|
1343
1354
|
addIceCandidate(candidate: any): void;
|
|
1344
1355
|
canModifyPeerConnection(): boolean;
|
|
1345
1356
|
close(): void;
|
|
@@ -1502,6 +1513,8 @@ type VegaAnalytics = {
|
|
|
1502
1513
|
vegaIceRestartMissingTransport: number;
|
|
1503
1514
|
vegaIceRestartWrongTransportId: number;
|
|
1504
1515
|
vegaNonErrorRejectionValueGUMError: number;
|
|
1516
|
+
micTrackEndedCount: number;
|
|
1517
|
+
camTrackEndedCount: number;
|
|
1505
1518
|
};
|
|
1506
1519
|
|
|
1507
1520
|
type MediaStreamWhichMayHaveInboundId = MediaStream & { inboundId?: string };
|
|
@@ -1874,4 +1887,4 @@ declare class RtcStream {
|
|
|
1874
1887
|
}
|
|
1875
1888
|
|
|
1876
1889
|
export { ADDITIONAL_SCREEN_SHARE_SETTINGS, 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_SIMULCAST_SETTINGS, STREAM_TYPES, ServerSocket, Session, SfuV2Parser, TYPES, VIDEO_SETTINGS_HD, VIDEO_SETTINGS_SD, VIDEO_SETTINGS_VP9, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH, 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, getMediasoupDeviceAsync, getNumFailedStatsReports, getNumFailedTrackSsrcLookups, getNumMissingTrackSsrcLookups, getPeerConnectionIndex, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isMobile, issueDetectorOrMetricEnabled, maybeRejectNoH264, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceSSRCs, replaceTracksInStream, _default as rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, sortCodecs, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, turnServerOverride, variance };
|
|
1877
|
-
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, InvalidAssistantKeyError, IssuesAndMetricsByView, JoinRoomRequest, KnockAcceptedEvent, KnockRejectedEvent, KnockRoomRequest, KnockerLeftEvent, LiveTranscriptionStartedEvent, LiveTranscriptionStoppedEvent, MaxViewerLimitReachedError, Metric, NewClientEvent, OrganizationAssistantNotEnabledError, OrganizationAssistantNotFoundError, 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, TurnTransportProtocol, UpdatedDeviceInfo, UpdatedDevicesInfo, VideoEnableRequest, VideoEnableRequestedEvent, VideoEnabledEvent };
|
|
1890
|
+
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, InvalidAssistantKeyError, IssuesAndMetricsByView, JoinRoomRequest, KnockAcceptedEvent, KnockRejectedEvent, KnockRoomRequest, KnockerLeftEvent, LiveTranscriptionStartedEvent, LiveTranscriptionStoppedEvent, MaxViewerLimitReachedError, Metric, NewClientEvent, OrganizationAssistantNotEnabledError, OrganizationAssistantNotFoundError, OrganizationPlanExhaustedError, RemoveSpotlightRequest, RoleName, RoomConcurrencyControlsError, RoomFullError, RoomJoinedErrors, RoomJoinedEvent, RoomJoinedSuccess, RoomKnockedEvent, RoomLockedError, RoomLockedEvent, RoomMeetingTimeExhaustedError, RoomMode, RoomSessionEndedEvent, RtcClientConnectionStatusChangedPayload, RtcEvents, RtcLocalStreamTrackAddedPayload, RtcLocalStreamTrackRemovedPayload, RtcManager, RtcManagerCreatedPayload, RtcStreamAddedPayload, SDPAnswerRelayMessage, SDPOfferRelayMessage, ScreenshareStartedEvent, ScreenshareStoppedEvent, SendClientMetadataRequest, SignalClient, SignalEvents, SignalKnocker, SignalRequests, SocketConf, SocketManager, Spotlight, SpotlightAddedEvent, SpotlightRemovedEvent, StatsMonitorOptions, StatsMonitorState, StatsSubscription, TurnTransportProtocol, UpdatedDeviceInfo, UpdatedDevicesInfo, VideoEnableRequest, VideoEnableRequestedEvent, VideoEnabledEvent };
|
package/dist/index.d.ts
CHANGED
|
@@ -381,6 +381,14 @@ type RtcEvents = {
|
|
|
381
381
|
remote_stream_track_added: void;
|
|
382
382
|
remote_stream_track_removed: void;
|
|
383
383
|
};
|
|
384
|
+
type SDPOfferRelayMessage = {
|
|
385
|
+
clientId: string;
|
|
386
|
+
message: RTCSessionDescription;
|
|
387
|
+
};
|
|
388
|
+
type SDPAnswerRelayMessage = {
|
|
389
|
+
clientId: string;
|
|
390
|
+
message: RTCSessionDescription;
|
|
391
|
+
};
|
|
384
392
|
type GetMediaConstraintsOptions = {
|
|
385
393
|
disableAEC: boolean;
|
|
386
394
|
disableAGC: boolean;
|
|
@@ -1081,6 +1089,20 @@ declare function fromLocation({ host, protocol }?: {
|
|
|
1081
1089
|
type P2PAnalytics = {
|
|
1082
1090
|
P2PReplaceTrackNoPC: number;
|
|
1083
1091
|
P2PNonErrorRejectionValueGUMError: number;
|
|
1092
|
+
numNewPc: number;
|
|
1093
|
+
numIceConnected: number;
|
|
1094
|
+
numIceRestart: number;
|
|
1095
|
+
numIceNoPublicIpGathered: number;
|
|
1096
|
+
numIceNoPublicIpGatheredIn3sec: number;
|
|
1097
|
+
numIceIpv6Seen: number;
|
|
1098
|
+
numIceIpv6TeredoSeen: number;
|
|
1099
|
+
numIceIpv6SixToFour: number;
|
|
1100
|
+
numIceMdnsSeen: number;
|
|
1101
|
+
micTrackEndedCount: number;
|
|
1102
|
+
camTrackEndedCount: number;
|
|
1103
|
+
numPcOnAnswerFailure: number;
|
|
1104
|
+
numPcOnOfferFailure: number;
|
|
1105
|
+
numPcSldFailure: number;
|
|
1084
1106
|
};
|
|
1085
1107
|
type P2PAnalyticMetric = keyof P2PAnalytics;
|
|
1086
1108
|
type P2PIncrementAnalyticMetric = (metric: P2PAnalyticMetric) => void;
|
|
@@ -1113,9 +1135,6 @@ declare class P2pRtcManager implements RtcManager {
|
|
|
1113
1135
|
_mediaserverConfigTtlSeconds: any;
|
|
1114
1136
|
_fetchMediaServersTimer: any;
|
|
1115
1137
|
_wasScreenSharing: any;
|
|
1116
|
-
ipv6HostCandidateTeredoSeen: any;
|
|
1117
|
-
ipv6HostCandidate6to4Seen: any;
|
|
1118
|
-
mdnsHostCandidateSeen: any;
|
|
1119
1138
|
_stoppedVideoTrack: any;
|
|
1120
1139
|
icePublicIPGatheringTimeoutID: any;
|
|
1121
1140
|
_videoTrackBeingMonitored?: CustomMediaStreamTrack;
|
|
@@ -1241,11 +1260,6 @@ declare class RtcManagerDispatcher {
|
|
|
1241
1260
|
declare const _default: {
|
|
1242
1261
|
CAMERA_NOT_WORKING: string;
|
|
1243
1262
|
CONNECTION_BLOCKED_BY_NETWORK: string;
|
|
1244
|
-
ICE_IPV6_SEEN: string;
|
|
1245
|
-
ICE_MDNS_SEEN: string;
|
|
1246
|
-
ICE_NO_PUBLIC_IP_GATHERED: string;
|
|
1247
|
-
ICE_NO_PUBLIC_IP_GATHERED_3SEC: string;
|
|
1248
|
-
ICE_RESTART: string;
|
|
1249
1263
|
MICROPHONE_NOT_WORKING: string;
|
|
1250
1264
|
MICROPHONE_STOPPED_WORKING: string;
|
|
1251
1265
|
CAMERA_STOPPED_WORKING: string;
|
|
@@ -1255,9 +1269,6 @@ declare const _default: {
|
|
|
1255
1269
|
SFU_CONNECTION_INFO: string;
|
|
1256
1270
|
COLOCATION_SPEAKER: string;
|
|
1257
1271
|
DOMINANT_SPEAKER: string;
|
|
1258
|
-
PC_SLD_FAILURE: string;
|
|
1259
|
-
PC_ON_ANSWER_FAILURE: string;
|
|
1260
|
-
PC_ON_OFFER_FAILURE: string;
|
|
1261
1272
|
};
|
|
1262
1273
|
|
|
1263
1274
|
declare function setVideoBandwidthUsingSetParameters(pc: any, bandwidth: any, logger?: any): any;
|
|
@@ -1338,8 +1349,8 @@ declare class Session {
|
|
|
1338
1349
|
removeTrack(track: MediaStreamTrack): void;
|
|
1339
1350
|
removeStream(stream: MediaStream): void;
|
|
1340
1351
|
_setRemoteDescription(desc: any): any;
|
|
1341
|
-
handleOffer(message:
|
|
1342
|
-
handleAnswer(message:
|
|
1352
|
+
handleOffer(message: RTCSessionDescription): any;
|
|
1353
|
+
handleAnswer(message: RTCSessionDescription): any;
|
|
1343
1354
|
addIceCandidate(candidate: any): void;
|
|
1344
1355
|
canModifyPeerConnection(): boolean;
|
|
1345
1356
|
close(): void;
|
|
@@ -1502,6 +1513,8 @@ type VegaAnalytics = {
|
|
|
1502
1513
|
vegaIceRestartMissingTransport: number;
|
|
1503
1514
|
vegaIceRestartWrongTransportId: number;
|
|
1504
1515
|
vegaNonErrorRejectionValueGUMError: number;
|
|
1516
|
+
micTrackEndedCount: number;
|
|
1517
|
+
camTrackEndedCount: number;
|
|
1505
1518
|
};
|
|
1506
1519
|
|
|
1507
1520
|
type MediaStreamWhichMayHaveInboundId = MediaStream & { inboundId?: string };
|
|
@@ -1874,4 +1887,4 @@ declare class RtcStream {
|
|
|
1874
1887
|
}
|
|
1875
1888
|
|
|
1876
1889
|
export { ADDITIONAL_SCREEN_SHARE_SETTINGS, 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_SIMULCAST_SETTINGS, STREAM_TYPES, ServerSocket, Session, SfuV2Parser, TYPES, VIDEO_SETTINGS_HD, VIDEO_SETTINGS_SD, VIDEO_SETTINGS_VP9, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH, 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, getMediasoupDeviceAsync, getNumFailedStatsReports, getNumFailedTrackSsrcLookups, getNumMissingTrackSsrcLookups, getPeerConnectionIndex, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isMobile, issueDetectorOrMetricEnabled, maybeRejectNoH264, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceSSRCs, replaceTracksInStream, _default as rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, sortCodecs, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, turnServerOverride, variance };
|
|
1877
|
-
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, InvalidAssistantKeyError, IssuesAndMetricsByView, JoinRoomRequest, KnockAcceptedEvent, KnockRejectedEvent, KnockRoomRequest, KnockerLeftEvent, LiveTranscriptionStartedEvent, LiveTranscriptionStoppedEvent, MaxViewerLimitReachedError, Metric, NewClientEvent, OrganizationAssistantNotEnabledError, OrganizationAssistantNotFoundError, 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, TurnTransportProtocol, UpdatedDeviceInfo, UpdatedDevicesInfo, VideoEnableRequest, VideoEnableRequestedEvent, VideoEnabledEvent };
|
|
1890
|
+
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, InvalidAssistantKeyError, IssuesAndMetricsByView, JoinRoomRequest, KnockAcceptedEvent, KnockRejectedEvent, KnockRoomRequest, KnockerLeftEvent, LiveTranscriptionStartedEvent, LiveTranscriptionStoppedEvent, MaxViewerLimitReachedError, Metric, NewClientEvent, OrganizationAssistantNotEnabledError, OrganizationAssistantNotFoundError, OrganizationPlanExhaustedError, RemoveSpotlightRequest, RoleName, RoomConcurrencyControlsError, RoomFullError, RoomJoinedErrors, RoomJoinedEvent, RoomJoinedSuccess, RoomKnockedEvent, RoomLockedError, RoomLockedEvent, RoomMeetingTimeExhaustedError, RoomMode, RoomSessionEndedEvent, RtcClientConnectionStatusChangedPayload, RtcEvents, RtcLocalStreamTrackAddedPayload, RtcLocalStreamTrackRemovedPayload, RtcManager, RtcManagerCreatedPayload, RtcStreamAddedPayload, SDPAnswerRelayMessage, SDPOfferRelayMessage, ScreenshareStartedEvent, ScreenshareStoppedEvent, SendClientMetadataRequest, SignalClient, SignalEvents, SignalKnocker, SignalRequests, SocketConf, SocketManager, Spotlight, SpotlightAddedEvent, SpotlightRemovedEvent, StatsMonitorOptions, StatsMonitorState, StatsSubscription, TurnTransportProtocol, UpdatedDeviceInfo, UpdatedDevicesInfo, VideoEnableRequest, VideoEnableRequestedEvent, VideoEnabledEvent };
|
package/dist/index.mjs
CHANGED
|
@@ -2288,8 +2288,6 @@ class Session {
|
|
|
2288
2288
|
const desc = { type: message.type, sdp };
|
|
2289
2289
|
return this._setRemoteDescription(desc).then(() => {
|
|
2290
2290
|
return setVideoBandwidthUsingSetParameters(this.pc, this.bandwidth);
|
|
2291
|
-
}, (e) => {
|
|
2292
|
-
logger$7.warn("Could not set remote description from remote answer: ", e);
|
|
2293
2291
|
});
|
|
2294
2292
|
}
|
|
2295
2293
|
addIceCandidate(candidate) {
|
|
@@ -2581,11 +2579,6 @@ class RtcStream {
|
|
|
2581
2579
|
var rtcManagerEvents = {
|
|
2582
2580
|
CAMERA_NOT_WORKING: "camera_not_working",
|
|
2583
2581
|
CONNECTION_BLOCKED_BY_NETWORK: "connection_blocked_by_network",
|
|
2584
|
-
ICE_IPV6_SEEN: "ice_ipv6_seen",
|
|
2585
|
-
ICE_MDNS_SEEN: "ice_mdns_seen",
|
|
2586
|
-
ICE_NO_PUBLIC_IP_GATHERED: "ice_no_public_ip_gathered",
|
|
2587
|
-
ICE_NO_PUBLIC_IP_GATHERED_3SEC: "ice_no_public_ip_gathered_3sec",
|
|
2588
|
-
ICE_RESTART: "ice_restart",
|
|
2589
2582
|
MICROPHONE_NOT_WORKING: "microphone_not_working",
|
|
2590
2583
|
MICROPHONE_STOPPED_WORKING: "microphone_stopped_working",
|
|
2591
2584
|
CAMERA_STOPPED_WORKING: "camera_stopped_working",
|
|
@@ -2595,9 +2588,6 @@ var rtcManagerEvents = {
|
|
|
2595
2588
|
SFU_CONNECTION_INFO: "sfu_connection_info",
|
|
2596
2589
|
COLOCATION_SPEAKER: "colocation_speaker",
|
|
2597
2590
|
DOMINANT_SPEAKER: "dominant_speaker",
|
|
2598
|
-
PC_SLD_FAILURE: "pc_sld_failure",
|
|
2599
|
-
PC_ON_ANSWER_FAILURE: "pc_on_answer_failure",
|
|
2600
|
-
PC_ON_OFFER_FAILURE: "pc_on_offer_failure",
|
|
2601
2591
|
};
|
|
2602
2592
|
|
|
2603
2593
|
var _a$2, _b$1, _c;
|
|
@@ -2640,10 +2630,12 @@ class P2pRtcManager {
|
|
|
2640
2630
|
this._audioTrackOnEnded = () => {
|
|
2641
2631
|
rtcStats.sendEvent("audio_ended", { unloading: unloading$1 });
|
|
2642
2632
|
this._emit(rtcManagerEvents.MICROPHONE_STOPPED_WORKING, {});
|
|
2633
|
+
this.analytics.micTrackEndedCount++;
|
|
2643
2634
|
};
|
|
2644
2635
|
this._videoTrackOnEnded = () => {
|
|
2645
2636
|
rtcStats.sendEvent("video_ended", { unloading: unloading$1 });
|
|
2646
2637
|
this._emit(rtcManagerEvents.CAMERA_STOPPED_WORKING, {});
|
|
2638
|
+
this.analytics.camTrackEndedCount++;
|
|
2647
2639
|
};
|
|
2648
2640
|
this._updateAndScheduleMediaServersRefresh({
|
|
2649
2641
|
sfuServer,
|
|
@@ -2655,6 +2647,20 @@ class P2pRtcManager {
|
|
|
2655
2647
|
this.analytics = {
|
|
2656
2648
|
P2PReplaceTrackNoPC: 0,
|
|
2657
2649
|
P2PNonErrorRejectionValueGUMError: 0,
|
|
2650
|
+
numNewPc: 0,
|
|
2651
|
+
numIceConnected: 0,
|
|
2652
|
+
numIceRestart: 0,
|
|
2653
|
+
numIceNoPublicIpGathered: 0,
|
|
2654
|
+
numIceNoPublicIpGatheredIn3sec: 0,
|
|
2655
|
+
numIceIpv6Seen: 0,
|
|
2656
|
+
numIceIpv6TeredoSeen: 0,
|
|
2657
|
+
numIceIpv6SixToFour: 0,
|
|
2658
|
+
numIceMdnsSeen: 0,
|
|
2659
|
+
micTrackEndedCount: 0,
|
|
2660
|
+
camTrackEndedCount: 0,
|
|
2661
|
+
numPcSldFailure: 0,
|
|
2662
|
+
numPcOnAnswerFailure: 0,
|
|
2663
|
+
numPcOnOfferFailure: 0,
|
|
2658
2664
|
};
|
|
2659
2665
|
}
|
|
2660
2666
|
numberOfPeerconnections() {
|
|
@@ -2783,7 +2789,7 @@ class P2pRtcManager {
|
|
|
2783
2789
|
message: this._transformOutgoingSdp(answer),
|
|
2784
2790
|
});
|
|
2785
2791
|
})).catch) === null || _b === void 0 ? void 0 : _b.call(_a, (e) => {
|
|
2786
|
-
this.
|
|
2792
|
+
this.analytics.numPcOnOfferFailure++;
|
|
2787
2793
|
});
|
|
2788
2794
|
}),
|
|
2789
2795
|
this._serverSocket.on(RELAY_MESSAGES.SDP_ANSWER, (data) => {
|
|
@@ -2795,7 +2801,8 @@ class P2pRtcManager {
|
|
|
2795
2801
|
}
|
|
2796
2802
|
const answer = this._transformIncomingSdp(data.message, session.pc);
|
|
2797
2803
|
(_b = (_a = session.handleAnswer(answer)) === null || _a === void 0 ? void 0 : _a.catch) === null || _b === void 0 ? void 0 : _b.call(_a, (e) => {
|
|
2798
|
-
|
|
2804
|
+
logger$6.warn("Could not set remote description from remote answer: ", e);
|
|
2805
|
+
this.analytics.numPcOnAnswerFailure++;
|
|
2799
2806
|
});
|
|
2800
2807
|
}),
|
|
2801
2808
|
this._serverSocket.on(PROTOCOL_RESPONSES.ROOM_JOINED, (payload) => {
|
|
@@ -2884,6 +2891,9 @@ class P2pRtcManager {
|
|
|
2884
2891
|
previous: previousStatus,
|
|
2885
2892
|
});
|
|
2886
2893
|
}, 0);
|
|
2894
|
+
if (newStatus === TYPES.CONNECTION_SUCCESSFUL) {
|
|
2895
|
+
this.analytics.numIceConnected++;
|
|
2896
|
+
}
|
|
2887
2897
|
}
|
|
2888
2898
|
_setJitterBufferTarget(pc) {
|
|
2889
2899
|
try {
|
|
@@ -2998,6 +3008,7 @@ class P2pRtcManager {
|
|
|
2998
3008
|
clientId,
|
|
2999
3009
|
});
|
|
3000
3010
|
setTimeout(() => this._emit(rtcManagerEvents.NEW_PC), 0);
|
|
3011
|
+
this.analytics.numNewPc++;
|
|
3001
3012
|
pc.ontrack = (event) => {
|
|
3002
3013
|
const stream = event.streams[0];
|
|
3003
3014
|
if (stream.id === "default" && stream.getAudioTracks().length === 0) {
|
|
@@ -3265,10 +3276,10 @@ class P2pRtcManager {
|
|
|
3265
3276
|
session.serverReflexiveCandidateSeen = false;
|
|
3266
3277
|
session.publicHostCandidateSeen = false;
|
|
3267
3278
|
session.ipv6HostCandidateSeen = false;
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
this.
|
|
3279
|
+
session.ipv6HostCandidateTeredoSeen = false;
|
|
3280
|
+
session.ipv6HostCandidate6to4Seen = false;
|
|
3281
|
+
session.mdnsHostCandidateSeen = false;
|
|
3282
|
+
this.analytics.numIceRestart++;
|
|
3272
3283
|
this._negotiatePeerConnection(clientId, session, Object.assign({}, this.offerOptions, { iceRestart: true }));
|
|
3273
3284
|
}
|
|
3274
3285
|
}
|
|
@@ -3340,7 +3351,7 @@ class P2pRtcManager {
|
|
|
3340
3351
|
pc.setLocalDescription(offer)
|
|
3341
3352
|
.catch((e) => {
|
|
3342
3353
|
logger$6.warn("RTCPeerConnection.setLocalDescription() failed with local offer", e);
|
|
3343
|
-
this.
|
|
3354
|
+
this.analytics.numPcSldFailure++;
|
|
3344
3355
|
throw e;
|
|
3345
3356
|
})
|
|
3346
3357
|
.then(() => {
|
|
@@ -3422,7 +3433,7 @@ class P2pRtcManager {
|
|
|
3422
3433
|
!session.relayCandidateSeen &&
|
|
3423
3434
|
!session.serverReflexiveCandidateSeen) {
|
|
3424
3435
|
if (pc.iceConnectionState !== "connected" || pc.iceConnectionState !== "completed")
|
|
3425
|
-
this.
|
|
3436
|
+
this.analytics.numIceNoPublicIpGatheredIn3sec++;
|
|
3426
3437
|
}
|
|
3427
3438
|
}, ICE_PUBLIC_IP_GATHERING_TIMEOUT);
|
|
3428
3439
|
break;
|
|
@@ -3470,15 +3481,11 @@ class P2pRtcManager {
|
|
|
3470
3481
|
}
|
|
3471
3482
|
break;
|
|
3472
3483
|
case "srflx":
|
|
3473
|
-
|
|
3474
|
-
session.serverReflexiveCandidateSeen = true;
|
|
3475
|
-
}
|
|
3484
|
+
session.serverReflexiveCandidateSeen = true;
|
|
3476
3485
|
break;
|
|
3477
3486
|
case "relay":
|
|
3478
3487
|
case "relayed":
|
|
3479
|
-
|
|
3480
|
-
session.relayCandidateSeen = true;
|
|
3481
|
-
}
|
|
3488
|
+
session.relayCandidateSeen = true;
|
|
3482
3489
|
break;
|
|
3483
3490
|
}
|
|
3484
3491
|
this._emitServerEvent(RELAY_MESSAGES.ICE_CANDIDATE, {
|
|
@@ -3495,16 +3502,17 @@ class P2pRtcManager {
|
|
|
3495
3502
|
!session.serverReflexiveCandidateSeen &&
|
|
3496
3503
|
pc.iceConnectionState !== "connected" &&
|
|
3497
3504
|
pc.iceConnectionState !== "completed") {
|
|
3498
|
-
this.
|
|
3505
|
+
this.analytics.numIceNoPublicIpGathered++;
|
|
3499
3506
|
}
|
|
3500
3507
|
if (session.ipv6HostCandidateSeen) {
|
|
3501
|
-
this.
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3508
|
+
this.analytics.numIceIpv6Seen++;
|
|
3509
|
+
if (session.ipv6HostCandidate6to4Seen)
|
|
3510
|
+
this.analytics.numIceIpv6SixToFour++;
|
|
3511
|
+
if (session.ipv6HostCandidateTeredoSeen)
|
|
3512
|
+
this.analytics.numIceIpv6TeredoSeen++;
|
|
3505
3513
|
}
|
|
3506
3514
|
if (session.mdnsHostCandidateSeen)
|
|
3507
|
-
this.
|
|
3515
|
+
this.analytics.numIceMdnsSeen++;
|
|
3508
3516
|
}
|
|
3509
3517
|
};
|
|
3510
3518
|
pc.onnegotiationneeded = () => {
|
|
@@ -4520,10 +4528,12 @@ class VegaRtcManager {
|
|
|
4520
4528
|
this._audioTrackOnEnded = () => {
|
|
4521
4529
|
rtcStats.sendEvent("audio_ended", { unloading });
|
|
4522
4530
|
this._emitToPWA(rtcManagerEvents.MICROPHONE_STOPPED_WORKING, {});
|
|
4531
|
+
this.analytics.micTrackEndedCount++;
|
|
4523
4532
|
};
|
|
4524
4533
|
this._videoTrackOnEnded = () => {
|
|
4525
4534
|
rtcStats.sendEvent("video_ended", { unloading });
|
|
4526
4535
|
this._emitToPWA(rtcManagerEvents.CAMERA_STOPPED_WORKING, {});
|
|
4536
|
+
this.analytics.camTrackEndedCount++;
|
|
4527
4537
|
};
|
|
4528
4538
|
this._updateAndScheduleMediaServersRefresh({
|
|
4529
4539
|
sfuServer,
|
|
@@ -4550,6 +4560,8 @@ class VegaRtcManager {
|
|
|
4550
4560
|
vegaIceRestartMissingTransport: 0,
|
|
4551
4561
|
vegaIceRestartWrongTransportId: 0,
|
|
4552
4562
|
vegaNonErrorRejectionValueGUMError: 0,
|
|
4563
|
+
micTrackEndedCount: 0,
|
|
4564
|
+
camTrackEndedCount: 0,
|
|
4553
4565
|
};
|
|
4554
4566
|
}
|
|
4555
4567
|
_updateAndScheduleMediaServersRefresh({ iceServers, turnServers, sfuServer, sfuServers, mediaserverConfigTtlSeconds, }) {
|
package/dist/legacy-esm.js
CHANGED
|
@@ -2288,8 +2288,6 @@ class Session {
|
|
|
2288
2288
|
const desc = { type: message.type, sdp };
|
|
2289
2289
|
return this._setRemoteDescription(desc).then(() => {
|
|
2290
2290
|
return setVideoBandwidthUsingSetParameters(this.pc, this.bandwidth);
|
|
2291
|
-
}, (e) => {
|
|
2292
|
-
logger$7.warn("Could not set remote description from remote answer: ", e);
|
|
2293
2291
|
});
|
|
2294
2292
|
}
|
|
2295
2293
|
addIceCandidate(candidate) {
|
|
@@ -2581,11 +2579,6 @@ class RtcStream {
|
|
|
2581
2579
|
var rtcManagerEvents = {
|
|
2582
2580
|
CAMERA_NOT_WORKING: "camera_not_working",
|
|
2583
2581
|
CONNECTION_BLOCKED_BY_NETWORK: "connection_blocked_by_network",
|
|
2584
|
-
ICE_IPV6_SEEN: "ice_ipv6_seen",
|
|
2585
|
-
ICE_MDNS_SEEN: "ice_mdns_seen",
|
|
2586
|
-
ICE_NO_PUBLIC_IP_GATHERED: "ice_no_public_ip_gathered",
|
|
2587
|
-
ICE_NO_PUBLIC_IP_GATHERED_3SEC: "ice_no_public_ip_gathered_3sec",
|
|
2588
|
-
ICE_RESTART: "ice_restart",
|
|
2589
2582
|
MICROPHONE_NOT_WORKING: "microphone_not_working",
|
|
2590
2583
|
MICROPHONE_STOPPED_WORKING: "microphone_stopped_working",
|
|
2591
2584
|
CAMERA_STOPPED_WORKING: "camera_stopped_working",
|
|
@@ -2595,9 +2588,6 @@ var rtcManagerEvents = {
|
|
|
2595
2588
|
SFU_CONNECTION_INFO: "sfu_connection_info",
|
|
2596
2589
|
COLOCATION_SPEAKER: "colocation_speaker",
|
|
2597
2590
|
DOMINANT_SPEAKER: "dominant_speaker",
|
|
2598
|
-
PC_SLD_FAILURE: "pc_sld_failure",
|
|
2599
|
-
PC_ON_ANSWER_FAILURE: "pc_on_answer_failure",
|
|
2600
|
-
PC_ON_OFFER_FAILURE: "pc_on_offer_failure",
|
|
2601
2591
|
};
|
|
2602
2592
|
|
|
2603
2593
|
var _a$2, _b$1, _c;
|
|
@@ -2640,10 +2630,12 @@ class P2pRtcManager {
|
|
|
2640
2630
|
this._audioTrackOnEnded = () => {
|
|
2641
2631
|
rtcStats.sendEvent("audio_ended", { unloading: unloading$1 });
|
|
2642
2632
|
this._emit(rtcManagerEvents.MICROPHONE_STOPPED_WORKING, {});
|
|
2633
|
+
this.analytics.micTrackEndedCount++;
|
|
2643
2634
|
};
|
|
2644
2635
|
this._videoTrackOnEnded = () => {
|
|
2645
2636
|
rtcStats.sendEvent("video_ended", { unloading: unloading$1 });
|
|
2646
2637
|
this._emit(rtcManagerEvents.CAMERA_STOPPED_WORKING, {});
|
|
2638
|
+
this.analytics.camTrackEndedCount++;
|
|
2647
2639
|
};
|
|
2648
2640
|
this._updateAndScheduleMediaServersRefresh({
|
|
2649
2641
|
sfuServer,
|
|
@@ -2655,6 +2647,20 @@ class P2pRtcManager {
|
|
|
2655
2647
|
this.analytics = {
|
|
2656
2648
|
P2PReplaceTrackNoPC: 0,
|
|
2657
2649
|
P2PNonErrorRejectionValueGUMError: 0,
|
|
2650
|
+
numNewPc: 0,
|
|
2651
|
+
numIceConnected: 0,
|
|
2652
|
+
numIceRestart: 0,
|
|
2653
|
+
numIceNoPublicIpGathered: 0,
|
|
2654
|
+
numIceNoPublicIpGatheredIn3sec: 0,
|
|
2655
|
+
numIceIpv6Seen: 0,
|
|
2656
|
+
numIceIpv6TeredoSeen: 0,
|
|
2657
|
+
numIceIpv6SixToFour: 0,
|
|
2658
|
+
numIceMdnsSeen: 0,
|
|
2659
|
+
micTrackEndedCount: 0,
|
|
2660
|
+
camTrackEndedCount: 0,
|
|
2661
|
+
numPcSldFailure: 0,
|
|
2662
|
+
numPcOnAnswerFailure: 0,
|
|
2663
|
+
numPcOnOfferFailure: 0,
|
|
2658
2664
|
};
|
|
2659
2665
|
}
|
|
2660
2666
|
numberOfPeerconnections() {
|
|
@@ -2783,7 +2789,7 @@ class P2pRtcManager {
|
|
|
2783
2789
|
message: this._transformOutgoingSdp(answer),
|
|
2784
2790
|
});
|
|
2785
2791
|
})).catch) === null || _b === void 0 ? void 0 : _b.call(_a, (e) => {
|
|
2786
|
-
this.
|
|
2792
|
+
this.analytics.numPcOnOfferFailure++;
|
|
2787
2793
|
});
|
|
2788
2794
|
}),
|
|
2789
2795
|
this._serverSocket.on(RELAY_MESSAGES.SDP_ANSWER, (data) => {
|
|
@@ -2795,7 +2801,8 @@ class P2pRtcManager {
|
|
|
2795
2801
|
}
|
|
2796
2802
|
const answer = this._transformIncomingSdp(data.message, session.pc);
|
|
2797
2803
|
(_b = (_a = session.handleAnswer(answer)) === null || _a === void 0 ? void 0 : _a.catch) === null || _b === void 0 ? void 0 : _b.call(_a, (e) => {
|
|
2798
|
-
|
|
2804
|
+
logger$6.warn("Could not set remote description from remote answer: ", e);
|
|
2805
|
+
this.analytics.numPcOnAnswerFailure++;
|
|
2799
2806
|
});
|
|
2800
2807
|
}),
|
|
2801
2808
|
this._serverSocket.on(PROTOCOL_RESPONSES.ROOM_JOINED, (payload) => {
|
|
@@ -2884,6 +2891,9 @@ class P2pRtcManager {
|
|
|
2884
2891
|
previous: previousStatus,
|
|
2885
2892
|
});
|
|
2886
2893
|
}, 0);
|
|
2894
|
+
if (newStatus === TYPES.CONNECTION_SUCCESSFUL) {
|
|
2895
|
+
this.analytics.numIceConnected++;
|
|
2896
|
+
}
|
|
2887
2897
|
}
|
|
2888
2898
|
_setJitterBufferTarget(pc) {
|
|
2889
2899
|
try {
|
|
@@ -2998,6 +3008,7 @@ class P2pRtcManager {
|
|
|
2998
3008
|
clientId,
|
|
2999
3009
|
});
|
|
3000
3010
|
setTimeout(() => this._emit(rtcManagerEvents.NEW_PC), 0);
|
|
3011
|
+
this.analytics.numNewPc++;
|
|
3001
3012
|
pc.ontrack = (event) => {
|
|
3002
3013
|
const stream = event.streams[0];
|
|
3003
3014
|
if (stream.id === "default" && stream.getAudioTracks().length === 0) {
|
|
@@ -3265,10 +3276,10 @@ class P2pRtcManager {
|
|
|
3265
3276
|
session.serverReflexiveCandidateSeen = false;
|
|
3266
3277
|
session.publicHostCandidateSeen = false;
|
|
3267
3278
|
session.ipv6HostCandidateSeen = false;
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
this.
|
|
3279
|
+
session.ipv6HostCandidateTeredoSeen = false;
|
|
3280
|
+
session.ipv6HostCandidate6to4Seen = false;
|
|
3281
|
+
session.mdnsHostCandidateSeen = false;
|
|
3282
|
+
this.analytics.numIceRestart++;
|
|
3272
3283
|
this._negotiatePeerConnection(clientId, session, Object.assign({}, this.offerOptions, { iceRestart: true }));
|
|
3273
3284
|
}
|
|
3274
3285
|
}
|
|
@@ -3340,7 +3351,7 @@ class P2pRtcManager {
|
|
|
3340
3351
|
pc.setLocalDescription(offer)
|
|
3341
3352
|
.catch((e) => {
|
|
3342
3353
|
logger$6.warn("RTCPeerConnection.setLocalDescription() failed with local offer", e);
|
|
3343
|
-
this.
|
|
3354
|
+
this.analytics.numPcSldFailure++;
|
|
3344
3355
|
throw e;
|
|
3345
3356
|
})
|
|
3346
3357
|
.then(() => {
|
|
@@ -3422,7 +3433,7 @@ class P2pRtcManager {
|
|
|
3422
3433
|
!session.relayCandidateSeen &&
|
|
3423
3434
|
!session.serverReflexiveCandidateSeen) {
|
|
3424
3435
|
if (pc.iceConnectionState !== "connected" || pc.iceConnectionState !== "completed")
|
|
3425
|
-
this.
|
|
3436
|
+
this.analytics.numIceNoPublicIpGatheredIn3sec++;
|
|
3426
3437
|
}
|
|
3427
3438
|
}, ICE_PUBLIC_IP_GATHERING_TIMEOUT);
|
|
3428
3439
|
break;
|
|
@@ -3470,15 +3481,11 @@ class P2pRtcManager {
|
|
|
3470
3481
|
}
|
|
3471
3482
|
break;
|
|
3472
3483
|
case "srflx":
|
|
3473
|
-
|
|
3474
|
-
session.serverReflexiveCandidateSeen = true;
|
|
3475
|
-
}
|
|
3484
|
+
session.serverReflexiveCandidateSeen = true;
|
|
3476
3485
|
break;
|
|
3477
3486
|
case "relay":
|
|
3478
3487
|
case "relayed":
|
|
3479
|
-
|
|
3480
|
-
session.relayCandidateSeen = true;
|
|
3481
|
-
}
|
|
3488
|
+
session.relayCandidateSeen = true;
|
|
3482
3489
|
break;
|
|
3483
3490
|
}
|
|
3484
3491
|
this._emitServerEvent(RELAY_MESSAGES.ICE_CANDIDATE, {
|
|
@@ -3495,16 +3502,17 @@ class P2pRtcManager {
|
|
|
3495
3502
|
!session.serverReflexiveCandidateSeen &&
|
|
3496
3503
|
pc.iceConnectionState !== "connected" &&
|
|
3497
3504
|
pc.iceConnectionState !== "completed") {
|
|
3498
|
-
this.
|
|
3505
|
+
this.analytics.numIceNoPublicIpGathered++;
|
|
3499
3506
|
}
|
|
3500
3507
|
if (session.ipv6HostCandidateSeen) {
|
|
3501
|
-
this.
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3508
|
+
this.analytics.numIceIpv6Seen++;
|
|
3509
|
+
if (session.ipv6HostCandidate6to4Seen)
|
|
3510
|
+
this.analytics.numIceIpv6SixToFour++;
|
|
3511
|
+
if (session.ipv6HostCandidateTeredoSeen)
|
|
3512
|
+
this.analytics.numIceIpv6TeredoSeen++;
|
|
3505
3513
|
}
|
|
3506
3514
|
if (session.mdnsHostCandidateSeen)
|
|
3507
|
-
this.
|
|
3515
|
+
this.analytics.numIceMdnsSeen++;
|
|
3508
3516
|
}
|
|
3509
3517
|
};
|
|
3510
3518
|
pc.onnegotiationneeded = () => {
|
|
@@ -4520,10 +4528,12 @@ class VegaRtcManager {
|
|
|
4520
4528
|
this._audioTrackOnEnded = () => {
|
|
4521
4529
|
rtcStats.sendEvent("audio_ended", { unloading });
|
|
4522
4530
|
this._emitToPWA(rtcManagerEvents.MICROPHONE_STOPPED_WORKING, {});
|
|
4531
|
+
this.analytics.micTrackEndedCount++;
|
|
4523
4532
|
};
|
|
4524
4533
|
this._videoTrackOnEnded = () => {
|
|
4525
4534
|
rtcStats.sendEvent("video_ended", { unloading });
|
|
4526
4535
|
this._emitToPWA(rtcManagerEvents.CAMERA_STOPPED_WORKING, {});
|
|
4536
|
+
this.analytics.camTrackEndedCount++;
|
|
4527
4537
|
};
|
|
4528
4538
|
this._updateAndScheduleMediaServersRefresh({
|
|
4529
4539
|
sfuServer,
|
|
@@ -4550,6 +4560,8 @@ class VegaRtcManager {
|
|
|
4550
4560
|
vegaIceRestartMissingTransport: 0,
|
|
4551
4561
|
vegaIceRestartWrongTransportId: 0,
|
|
4552
4562
|
vegaNonErrorRejectionValueGUMError: 0,
|
|
4563
|
+
micTrackEndedCount: 0,
|
|
4564
|
+
camTrackEndedCount: 0,
|
|
4553
4565
|
};
|
|
4554
4566
|
}
|
|
4555
4567
|
_updateAndScheduleMediaServersRefresh({ iceServers, turnServers, sfuServer, sfuServers, mediaserverConfigTtlSeconds, }) {
|