@whereby.com/media 2.6.6 → 2.6.7
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 +27 -22
- package/dist/index.d.cts +9 -8
- package/dist/index.d.mts +9 -8
- package/dist/index.d.ts +9 -8
- package/dist/index.mjs +27 -22
- package/dist/legacy-esm.js +27 -22
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2602,11 +2602,6 @@ class RtcStream {
|
|
|
2602
2602
|
var rtcManagerEvents = {
|
|
2603
2603
|
CAMERA_NOT_WORKING: "camera_not_working",
|
|
2604
2604
|
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
2605
|
MICROPHONE_NOT_WORKING: "microphone_not_working",
|
|
2611
2606
|
MICROPHONE_STOPPED_WORKING: "microphone_stopped_working",
|
|
2612
2607
|
CAMERA_STOPPED_WORKING: "camera_stopped_working",
|
|
@@ -2676,6 +2671,15 @@ class P2pRtcManager {
|
|
|
2676
2671
|
this.analytics = {
|
|
2677
2672
|
P2PReplaceTrackNoPC: 0,
|
|
2678
2673
|
P2PNonErrorRejectionValueGUMError: 0,
|
|
2674
|
+
numNewPc: 0,
|
|
2675
|
+
numIceConnected: 0,
|
|
2676
|
+
numIceRestart: 0,
|
|
2677
|
+
numIceNoPublicIpGathered: 0,
|
|
2678
|
+
numIceNoPublicIpGatheredIn3sec: 0,
|
|
2679
|
+
numIceIpv6Seen: 0,
|
|
2680
|
+
numIceIpv6TeredoSeen: 0,
|
|
2681
|
+
numIceIpv6SixToFour: 0,
|
|
2682
|
+
numIceMdnsSeen: 0,
|
|
2679
2683
|
};
|
|
2680
2684
|
}
|
|
2681
2685
|
numberOfPeerconnections() {
|
|
@@ -2905,6 +2909,9 @@ class P2pRtcManager {
|
|
|
2905
2909
|
previous: previousStatus,
|
|
2906
2910
|
});
|
|
2907
2911
|
}, 0);
|
|
2912
|
+
if (newStatus === TYPES.CONNECTION_SUCCESSFUL) {
|
|
2913
|
+
this.analytics.numIceConnected++;
|
|
2914
|
+
}
|
|
2908
2915
|
}
|
|
2909
2916
|
_setJitterBufferTarget(pc) {
|
|
2910
2917
|
try {
|
|
@@ -3019,6 +3026,7 @@ class P2pRtcManager {
|
|
|
3019
3026
|
clientId,
|
|
3020
3027
|
});
|
|
3021
3028
|
setTimeout(() => this._emit(rtcManagerEvents.NEW_PC), 0);
|
|
3029
|
+
this.analytics.numNewPc++;
|
|
3022
3030
|
pc.ontrack = (event) => {
|
|
3023
3031
|
const stream = event.streams[0];
|
|
3024
3032
|
if (stream.id === "default" && stream.getAudioTracks().length === 0) {
|
|
@@ -3286,10 +3294,10 @@ class P2pRtcManager {
|
|
|
3286
3294
|
session.serverReflexiveCandidateSeen = false;
|
|
3287
3295
|
session.publicHostCandidateSeen = false;
|
|
3288
3296
|
session.ipv6HostCandidateSeen = false;
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
this.
|
|
3297
|
+
session.ipv6HostCandidateTeredoSeen = false;
|
|
3298
|
+
session.ipv6HostCandidate6to4Seen = false;
|
|
3299
|
+
session.mdnsHostCandidateSeen = false;
|
|
3300
|
+
this.analytics.numIceRestart++;
|
|
3293
3301
|
this._negotiatePeerConnection(clientId, session, Object.assign({}, this.offerOptions, { iceRestart: true }));
|
|
3294
3302
|
}
|
|
3295
3303
|
}
|
|
@@ -3443,7 +3451,7 @@ class P2pRtcManager {
|
|
|
3443
3451
|
!session.relayCandidateSeen &&
|
|
3444
3452
|
!session.serverReflexiveCandidateSeen) {
|
|
3445
3453
|
if (pc.iceConnectionState !== "connected" || pc.iceConnectionState !== "completed")
|
|
3446
|
-
this.
|
|
3454
|
+
this.analytics.numIceNoPublicIpGatheredIn3sec++;
|
|
3447
3455
|
}
|
|
3448
3456
|
}, ICE_PUBLIC_IP_GATHERING_TIMEOUT);
|
|
3449
3457
|
break;
|
|
@@ -3491,15 +3499,11 @@ class P2pRtcManager {
|
|
|
3491
3499
|
}
|
|
3492
3500
|
break;
|
|
3493
3501
|
case "srflx":
|
|
3494
|
-
|
|
3495
|
-
session.serverReflexiveCandidateSeen = true;
|
|
3496
|
-
}
|
|
3502
|
+
session.serverReflexiveCandidateSeen = true;
|
|
3497
3503
|
break;
|
|
3498
3504
|
case "relay":
|
|
3499
3505
|
case "relayed":
|
|
3500
|
-
|
|
3501
|
-
session.relayCandidateSeen = true;
|
|
3502
|
-
}
|
|
3506
|
+
session.relayCandidateSeen = true;
|
|
3503
3507
|
break;
|
|
3504
3508
|
}
|
|
3505
3509
|
this._emitServerEvent(RELAY_MESSAGES.ICE_CANDIDATE, {
|
|
@@ -3516,16 +3520,17 @@ class P2pRtcManager {
|
|
|
3516
3520
|
!session.serverReflexiveCandidateSeen &&
|
|
3517
3521
|
pc.iceConnectionState !== "connected" &&
|
|
3518
3522
|
pc.iceConnectionState !== "completed") {
|
|
3519
|
-
this.
|
|
3523
|
+
this.analytics.numIceNoPublicIpGathered++;
|
|
3520
3524
|
}
|
|
3521
3525
|
if (session.ipv6HostCandidateSeen) {
|
|
3522
|
-
this.
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
+
this.analytics.numIceIpv6Seen++;
|
|
3527
|
+
if (session.ipv6HostCandidate6to4Seen)
|
|
3528
|
+
this.analytics.numIceIpv6SixToFour++;
|
|
3529
|
+
if (session.ipv6HostCandidateTeredoSeen)
|
|
3530
|
+
this.analytics.numIceIpv6TeredoSeen++;
|
|
3526
3531
|
}
|
|
3527
3532
|
if (session.mdnsHostCandidateSeen)
|
|
3528
|
-
this.
|
|
3533
|
+
this.analytics.numIceMdnsSeen++;
|
|
3529
3534
|
}
|
|
3530
3535
|
};
|
|
3531
3536
|
pc.onnegotiationneeded = () => {
|
package/dist/index.d.cts
CHANGED
|
@@ -1081,6 +1081,15 @@ declare function fromLocation({ host, protocol }?: {
|
|
|
1081
1081
|
type P2PAnalytics = {
|
|
1082
1082
|
P2PReplaceTrackNoPC: number;
|
|
1083
1083
|
P2PNonErrorRejectionValueGUMError: number;
|
|
1084
|
+
numNewPc: number;
|
|
1085
|
+
numIceConnected: number;
|
|
1086
|
+
numIceRestart: number;
|
|
1087
|
+
numIceNoPublicIpGathered: number;
|
|
1088
|
+
numIceNoPublicIpGatheredIn3sec: number;
|
|
1089
|
+
numIceIpv6Seen: number;
|
|
1090
|
+
numIceIpv6TeredoSeen: number;
|
|
1091
|
+
numIceIpv6SixToFour: number;
|
|
1092
|
+
numIceMdnsSeen: number;
|
|
1084
1093
|
};
|
|
1085
1094
|
type P2PAnalyticMetric = keyof P2PAnalytics;
|
|
1086
1095
|
type P2PIncrementAnalyticMetric = (metric: P2PAnalyticMetric) => void;
|
|
@@ -1113,9 +1122,6 @@ declare class P2pRtcManager implements RtcManager {
|
|
|
1113
1122
|
_mediaserverConfigTtlSeconds: any;
|
|
1114
1123
|
_fetchMediaServersTimer: any;
|
|
1115
1124
|
_wasScreenSharing: any;
|
|
1116
|
-
ipv6HostCandidateTeredoSeen: any;
|
|
1117
|
-
ipv6HostCandidate6to4Seen: any;
|
|
1118
|
-
mdnsHostCandidateSeen: any;
|
|
1119
1125
|
_stoppedVideoTrack: any;
|
|
1120
1126
|
icePublicIPGatheringTimeoutID: any;
|
|
1121
1127
|
_videoTrackBeingMonitored?: CustomMediaStreamTrack;
|
|
@@ -1241,11 +1247,6 @@ declare class RtcManagerDispatcher {
|
|
|
1241
1247
|
declare const _default: {
|
|
1242
1248
|
CAMERA_NOT_WORKING: string;
|
|
1243
1249
|
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
1250
|
MICROPHONE_NOT_WORKING: string;
|
|
1250
1251
|
MICROPHONE_STOPPED_WORKING: string;
|
|
1251
1252
|
CAMERA_STOPPED_WORKING: string;
|
package/dist/index.d.mts
CHANGED
|
@@ -1081,6 +1081,15 @@ declare function fromLocation({ host, protocol }?: {
|
|
|
1081
1081
|
type P2PAnalytics = {
|
|
1082
1082
|
P2PReplaceTrackNoPC: number;
|
|
1083
1083
|
P2PNonErrorRejectionValueGUMError: number;
|
|
1084
|
+
numNewPc: number;
|
|
1085
|
+
numIceConnected: number;
|
|
1086
|
+
numIceRestart: number;
|
|
1087
|
+
numIceNoPublicIpGathered: number;
|
|
1088
|
+
numIceNoPublicIpGatheredIn3sec: number;
|
|
1089
|
+
numIceIpv6Seen: number;
|
|
1090
|
+
numIceIpv6TeredoSeen: number;
|
|
1091
|
+
numIceIpv6SixToFour: number;
|
|
1092
|
+
numIceMdnsSeen: number;
|
|
1084
1093
|
};
|
|
1085
1094
|
type P2PAnalyticMetric = keyof P2PAnalytics;
|
|
1086
1095
|
type P2PIncrementAnalyticMetric = (metric: P2PAnalyticMetric) => void;
|
|
@@ -1113,9 +1122,6 @@ declare class P2pRtcManager implements RtcManager {
|
|
|
1113
1122
|
_mediaserverConfigTtlSeconds: any;
|
|
1114
1123
|
_fetchMediaServersTimer: any;
|
|
1115
1124
|
_wasScreenSharing: any;
|
|
1116
|
-
ipv6HostCandidateTeredoSeen: any;
|
|
1117
|
-
ipv6HostCandidate6to4Seen: any;
|
|
1118
|
-
mdnsHostCandidateSeen: any;
|
|
1119
1125
|
_stoppedVideoTrack: any;
|
|
1120
1126
|
icePublicIPGatheringTimeoutID: any;
|
|
1121
1127
|
_videoTrackBeingMonitored?: CustomMediaStreamTrack;
|
|
@@ -1241,11 +1247,6 @@ declare class RtcManagerDispatcher {
|
|
|
1241
1247
|
declare const _default: {
|
|
1242
1248
|
CAMERA_NOT_WORKING: string;
|
|
1243
1249
|
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
1250
|
MICROPHONE_NOT_WORKING: string;
|
|
1250
1251
|
MICROPHONE_STOPPED_WORKING: string;
|
|
1251
1252
|
CAMERA_STOPPED_WORKING: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1081,6 +1081,15 @@ declare function fromLocation({ host, protocol }?: {
|
|
|
1081
1081
|
type P2PAnalytics = {
|
|
1082
1082
|
P2PReplaceTrackNoPC: number;
|
|
1083
1083
|
P2PNonErrorRejectionValueGUMError: number;
|
|
1084
|
+
numNewPc: number;
|
|
1085
|
+
numIceConnected: number;
|
|
1086
|
+
numIceRestart: number;
|
|
1087
|
+
numIceNoPublicIpGathered: number;
|
|
1088
|
+
numIceNoPublicIpGatheredIn3sec: number;
|
|
1089
|
+
numIceIpv6Seen: number;
|
|
1090
|
+
numIceIpv6TeredoSeen: number;
|
|
1091
|
+
numIceIpv6SixToFour: number;
|
|
1092
|
+
numIceMdnsSeen: number;
|
|
1084
1093
|
};
|
|
1085
1094
|
type P2PAnalyticMetric = keyof P2PAnalytics;
|
|
1086
1095
|
type P2PIncrementAnalyticMetric = (metric: P2PAnalyticMetric) => void;
|
|
@@ -1113,9 +1122,6 @@ declare class P2pRtcManager implements RtcManager {
|
|
|
1113
1122
|
_mediaserverConfigTtlSeconds: any;
|
|
1114
1123
|
_fetchMediaServersTimer: any;
|
|
1115
1124
|
_wasScreenSharing: any;
|
|
1116
|
-
ipv6HostCandidateTeredoSeen: any;
|
|
1117
|
-
ipv6HostCandidate6to4Seen: any;
|
|
1118
|
-
mdnsHostCandidateSeen: any;
|
|
1119
1125
|
_stoppedVideoTrack: any;
|
|
1120
1126
|
icePublicIPGatheringTimeoutID: any;
|
|
1121
1127
|
_videoTrackBeingMonitored?: CustomMediaStreamTrack;
|
|
@@ -1241,11 +1247,6 @@ declare class RtcManagerDispatcher {
|
|
|
1241
1247
|
declare const _default: {
|
|
1242
1248
|
CAMERA_NOT_WORKING: string;
|
|
1243
1249
|
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
1250
|
MICROPHONE_NOT_WORKING: string;
|
|
1250
1251
|
MICROPHONE_STOPPED_WORKING: string;
|
|
1251
1252
|
CAMERA_STOPPED_WORKING: string;
|
package/dist/index.mjs
CHANGED
|
@@ -2581,11 +2581,6 @@ class RtcStream {
|
|
|
2581
2581
|
var rtcManagerEvents = {
|
|
2582
2582
|
CAMERA_NOT_WORKING: "camera_not_working",
|
|
2583
2583
|
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
2584
|
MICROPHONE_NOT_WORKING: "microphone_not_working",
|
|
2590
2585
|
MICROPHONE_STOPPED_WORKING: "microphone_stopped_working",
|
|
2591
2586
|
CAMERA_STOPPED_WORKING: "camera_stopped_working",
|
|
@@ -2655,6 +2650,15 @@ class P2pRtcManager {
|
|
|
2655
2650
|
this.analytics = {
|
|
2656
2651
|
P2PReplaceTrackNoPC: 0,
|
|
2657
2652
|
P2PNonErrorRejectionValueGUMError: 0,
|
|
2653
|
+
numNewPc: 0,
|
|
2654
|
+
numIceConnected: 0,
|
|
2655
|
+
numIceRestart: 0,
|
|
2656
|
+
numIceNoPublicIpGathered: 0,
|
|
2657
|
+
numIceNoPublicIpGatheredIn3sec: 0,
|
|
2658
|
+
numIceIpv6Seen: 0,
|
|
2659
|
+
numIceIpv6TeredoSeen: 0,
|
|
2660
|
+
numIceIpv6SixToFour: 0,
|
|
2661
|
+
numIceMdnsSeen: 0,
|
|
2658
2662
|
};
|
|
2659
2663
|
}
|
|
2660
2664
|
numberOfPeerconnections() {
|
|
@@ -2884,6 +2888,9 @@ class P2pRtcManager {
|
|
|
2884
2888
|
previous: previousStatus,
|
|
2885
2889
|
});
|
|
2886
2890
|
}, 0);
|
|
2891
|
+
if (newStatus === TYPES.CONNECTION_SUCCESSFUL) {
|
|
2892
|
+
this.analytics.numIceConnected++;
|
|
2893
|
+
}
|
|
2887
2894
|
}
|
|
2888
2895
|
_setJitterBufferTarget(pc) {
|
|
2889
2896
|
try {
|
|
@@ -2998,6 +3005,7 @@ class P2pRtcManager {
|
|
|
2998
3005
|
clientId,
|
|
2999
3006
|
});
|
|
3000
3007
|
setTimeout(() => this._emit(rtcManagerEvents.NEW_PC), 0);
|
|
3008
|
+
this.analytics.numNewPc++;
|
|
3001
3009
|
pc.ontrack = (event) => {
|
|
3002
3010
|
const stream = event.streams[0];
|
|
3003
3011
|
if (stream.id === "default" && stream.getAudioTracks().length === 0) {
|
|
@@ -3265,10 +3273,10 @@ class P2pRtcManager {
|
|
|
3265
3273
|
session.serverReflexiveCandidateSeen = false;
|
|
3266
3274
|
session.publicHostCandidateSeen = false;
|
|
3267
3275
|
session.ipv6HostCandidateSeen = false;
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
this.
|
|
3276
|
+
session.ipv6HostCandidateTeredoSeen = false;
|
|
3277
|
+
session.ipv6HostCandidate6to4Seen = false;
|
|
3278
|
+
session.mdnsHostCandidateSeen = false;
|
|
3279
|
+
this.analytics.numIceRestart++;
|
|
3272
3280
|
this._negotiatePeerConnection(clientId, session, Object.assign({}, this.offerOptions, { iceRestart: true }));
|
|
3273
3281
|
}
|
|
3274
3282
|
}
|
|
@@ -3422,7 +3430,7 @@ class P2pRtcManager {
|
|
|
3422
3430
|
!session.relayCandidateSeen &&
|
|
3423
3431
|
!session.serverReflexiveCandidateSeen) {
|
|
3424
3432
|
if (pc.iceConnectionState !== "connected" || pc.iceConnectionState !== "completed")
|
|
3425
|
-
this.
|
|
3433
|
+
this.analytics.numIceNoPublicIpGatheredIn3sec++;
|
|
3426
3434
|
}
|
|
3427
3435
|
}, ICE_PUBLIC_IP_GATHERING_TIMEOUT);
|
|
3428
3436
|
break;
|
|
@@ -3470,15 +3478,11 @@ class P2pRtcManager {
|
|
|
3470
3478
|
}
|
|
3471
3479
|
break;
|
|
3472
3480
|
case "srflx":
|
|
3473
|
-
|
|
3474
|
-
session.serverReflexiveCandidateSeen = true;
|
|
3475
|
-
}
|
|
3481
|
+
session.serverReflexiveCandidateSeen = true;
|
|
3476
3482
|
break;
|
|
3477
3483
|
case "relay":
|
|
3478
3484
|
case "relayed":
|
|
3479
|
-
|
|
3480
|
-
session.relayCandidateSeen = true;
|
|
3481
|
-
}
|
|
3485
|
+
session.relayCandidateSeen = true;
|
|
3482
3486
|
break;
|
|
3483
3487
|
}
|
|
3484
3488
|
this._emitServerEvent(RELAY_MESSAGES.ICE_CANDIDATE, {
|
|
@@ -3495,16 +3499,17 @@ class P2pRtcManager {
|
|
|
3495
3499
|
!session.serverReflexiveCandidateSeen &&
|
|
3496
3500
|
pc.iceConnectionState !== "connected" &&
|
|
3497
3501
|
pc.iceConnectionState !== "completed") {
|
|
3498
|
-
this.
|
|
3502
|
+
this.analytics.numIceNoPublicIpGathered++;
|
|
3499
3503
|
}
|
|
3500
3504
|
if (session.ipv6HostCandidateSeen) {
|
|
3501
|
-
this.
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
+
this.analytics.numIceIpv6Seen++;
|
|
3506
|
+
if (session.ipv6HostCandidate6to4Seen)
|
|
3507
|
+
this.analytics.numIceIpv6SixToFour++;
|
|
3508
|
+
if (session.ipv6HostCandidateTeredoSeen)
|
|
3509
|
+
this.analytics.numIceIpv6TeredoSeen++;
|
|
3505
3510
|
}
|
|
3506
3511
|
if (session.mdnsHostCandidateSeen)
|
|
3507
|
-
this.
|
|
3512
|
+
this.analytics.numIceMdnsSeen++;
|
|
3508
3513
|
}
|
|
3509
3514
|
};
|
|
3510
3515
|
pc.onnegotiationneeded = () => {
|
package/dist/legacy-esm.js
CHANGED
|
@@ -2581,11 +2581,6 @@ class RtcStream {
|
|
|
2581
2581
|
var rtcManagerEvents = {
|
|
2582
2582
|
CAMERA_NOT_WORKING: "camera_not_working",
|
|
2583
2583
|
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
2584
|
MICROPHONE_NOT_WORKING: "microphone_not_working",
|
|
2590
2585
|
MICROPHONE_STOPPED_WORKING: "microphone_stopped_working",
|
|
2591
2586
|
CAMERA_STOPPED_WORKING: "camera_stopped_working",
|
|
@@ -2655,6 +2650,15 @@ class P2pRtcManager {
|
|
|
2655
2650
|
this.analytics = {
|
|
2656
2651
|
P2PReplaceTrackNoPC: 0,
|
|
2657
2652
|
P2PNonErrorRejectionValueGUMError: 0,
|
|
2653
|
+
numNewPc: 0,
|
|
2654
|
+
numIceConnected: 0,
|
|
2655
|
+
numIceRestart: 0,
|
|
2656
|
+
numIceNoPublicIpGathered: 0,
|
|
2657
|
+
numIceNoPublicIpGatheredIn3sec: 0,
|
|
2658
|
+
numIceIpv6Seen: 0,
|
|
2659
|
+
numIceIpv6TeredoSeen: 0,
|
|
2660
|
+
numIceIpv6SixToFour: 0,
|
|
2661
|
+
numIceMdnsSeen: 0,
|
|
2658
2662
|
};
|
|
2659
2663
|
}
|
|
2660
2664
|
numberOfPeerconnections() {
|
|
@@ -2884,6 +2888,9 @@ class P2pRtcManager {
|
|
|
2884
2888
|
previous: previousStatus,
|
|
2885
2889
|
});
|
|
2886
2890
|
}, 0);
|
|
2891
|
+
if (newStatus === TYPES.CONNECTION_SUCCESSFUL) {
|
|
2892
|
+
this.analytics.numIceConnected++;
|
|
2893
|
+
}
|
|
2887
2894
|
}
|
|
2888
2895
|
_setJitterBufferTarget(pc) {
|
|
2889
2896
|
try {
|
|
@@ -2998,6 +3005,7 @@ class P2pRtcManager {
|
|
|
2998
3005
|
clientId,
|
|
2999
3006
|
});
|
|
3000
3007
|
setTimeout(() => this._emit(rtcManagerEvents.NEW_PC), 0);
|
|
3008
|
+
this.analytics.numNewPc++;
|
|
3001
3009
|
pc.ontrack = (event) => {
|
|
3002
3010
|
const stream = event.streams[0];
|
|
3003
3011
|
if (stream.id === "default" && stream.getAudioTracks().length === 0) {
|
|
@@ -3265,10 +3273,10 @@ class P2pRtcManager {
|
|
|
3265
3273
|
session.serverReflexiveCandidateSeen = false;
|
|
3266
3274
|
session.publicHostCandidateSeen = false;
|
|
3267
3275
|
session.ipv6HostCandidateSeen = false;
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
this.
|
|
3276
|
+
session.ipv6HostCandidateTeredoSeen = false;
|
|
3277
|
+
session.ipv6HostCandidate6to4Seen = false;
|
|
3278
|
+
session.mdnsHostCandidateSeen = false;
|
|
3279
|
+
this.analytics.numIceRestart++;
|
|
3272
3280
|
this._negotiatePeerConnection(clientId, session, Object.assign({}, this.offerOptions, { iceRestart: true }));
|
|
3273
3281
|
}
|
|
3274
3282
|
}
|
|
@@ -3422,7 +3430,7 @@ class P2pRtcManager {
|
|
|
3422
3430
|
!session.relayCandidateSeen &&
|
|
3423
3431
|
!session.serverReflexiveCandidateSeen) {
|
|
3424
3432
|
if (pc.iceConnectionState !== "connected" || pc.iceConnectionState !== "completed")
|
|
3425
|
-
this.
|
|
3433
|
+
this.analytics.numIceNoPublicIpGatheredIn3sec++;
|
|
3426
3434
|
}
|
|
3427
3435
|
}, ICE_PUBLIC_IP_GATHERING_TIMEOUT);
|
|
3428
3436
|
break;
|
|
@@ -3470,15 +3478,11 @@ class P2pRtcManager {
|
|
|
3470
3478
|
}
|
|
3471
3479
|
break;
|
|
3472
3480
|
case "srflx":
|
|
3473
|
-
|
|
3474
|
-
session.serverReflexiveCandidateSeen = true;
|
|
3475
|
-
}
|
|
3481
|
+
session.serverReflexiveCandidateSeen = true;
|
|
3476
3482
|
break;
|
|
3477
3483
|
case "relay":
|
|
3478
3484
|
case "relayed":
|
|
3479
|
-
|
|
3480
|
-
session.relayCandidateSeen = true;
|
|
3481
|
-
}
|
|
3485
|
+
session.relayCandidateSeen = true;
|
|
3482
3486
|
break;
|
|
3483
3487
|
}
|
|
3484
3488
|
this._emitServerEvent(RELAY_MESSAGES.ICE_CANDIDATE, {
|
|
@@ -3495,16 +3499,17 @@ class P2pRtcManager {
|
|
|
3495
3499
|
!session.serverReflexiveCandidateSeen &&
|
|
3496
3500
|
pc.iceConnectionState !== "connected" &&
|
|
3497
3501
|
pc.iceConnectionState !== "completed") {
|
|
3498
|
-
this.
|
|
3502
|
+
this.analytics.numIceNoPublicIpGathered++;
|
|
3499
3503
|
}
|
|
3500
3504
|
if (session.ipv6HostCandidateSeen) {
|
|
3501
|
-
this.
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
+
this.analytics.numIceIpv6Seen++;
|
|
3506
|
+
if (session.ipv6HostCandidate6to4Seen)
|
|
3507
|
+
this.analytics.numIceIpv6SixToFour++;
|
|
3508
|
+
if (session.ipv6HostCandidateTeredoSeen)
|
|
3509
|
+
this.analytics.numIceIpv6TeredoSeen++;
|
|
3505
3510
|
}
|
|
3506
3511
|
if (session.mdnsHostCandidateSeen)
|
|
3507
|
-
this.
|
|
3512
|
+
this.analytics.numIceMdnsSeen++;
|
|
3508
3513
|
}
|
|
3509
3514
|
};
|
|
3510
3515
|
pc.onnegotiationneeded = () => {
|