@whereby.com/media 8.0.0 → 8.0.2
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 +135 -146
- package/dist/index.d.cts +28 -20
- package/dist/index.d.mts +28 -20
- package/dist/index.d.ts +28 -20
- package/dist/index.mjs +135 -146
- package/dist/legacy-esm.js +135 -146
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -2217,8 +2217,7 @@ var _a$4;
|
|
|
2217
2217
|
const adapter$4 = (_a$4 = adapterRaw.default) !== null && _a$4 !== void 0 ? _a$4 : adapterRaw;
|
|
2218
2218
|
const logger$7 = new Logger();
|
|
2219
2219
|
class Session {
|
|
2220
|
-
constructor({
|
|
2221
|
-
this.peerConnectionId = peerConnectionId;
|
|
2220
|
+
constructor({ clientId, bandwidth, peerConnectionConfig, deprioritizeH264Encoding, incrementAnalyticMetric, }) {
|
|
2222
2221
|
this.relayCandidateSeen = false;
|
|
2223
2222
|
this.serverReflexiveCandidateSeen = false;
|
|
2224
2223
|
this.publicHostCandidateSeen = false;
|
|
@@ -2755,8 +2754,8 @@ class P2pRtcManager {
|
|
|
2755
2754
|
}
|
|
2756
2755
|
disconnectAll() {
|
|
2757
2756
|
logger$6.info("disconnectAll()");
|
|
2758
|
-
Object.keys(this.peerConnections).forEach((
|
|
2759
|
-
this.disconnect(
|
|
2757
|
+
Object.keys(this.peerConnections).forEach((clientId) => {
|
|
2758
|
+
this.disconnect(clientId);
|
|
2760
2759
|
});
|
|
2761
2760
|
this.peerConnections = {};
|
|
2762
2761
|
this._socketListenerDeregisterFunctions.forEach((func) => {
|
|
@@ -2955,16 +2954,14 @@ class P2pRtcManager {
|
|
|
2955
2954
|
_emit(eventName, data) {
|
|
2956
2955
|
this._emitter.emit(eventName, data);
|
|
2957
2956
|
}
|
|
2958
|
-
_getSession(
|
|
2959
|
-
if (!(
|
|
2957
|
+
_getSession(clientId) {
|
|
2958
|
+
if (!(clientId in this.peerConnections)) {
|
|
2960
2959
|
return null;
|
|
2961
2960
|
}
|
|
2962
|
-
return this.peerConnections[
|
|
2961
|
+
return this.peerConnections[clientId];
|
|
2963
2962
|
}
|
|
2964
|
-
_createSession({ clientId, initialBandwidth, isOfferer
|
|
2965
|
-
|
|
2966
|
-
throw new Error("peerConnectionId is missing");
|
|
2967
|
-
}
|
|
2963
|
+
_createSession({ clientId, initialBandwidth, isOfferer }) {
|
|
2964
|
+
var _a, _b;
|
|
2968
2965
|
if (!clientId) {
|
|
2969
2966
|
throw new Error("clientId is missing");
|
|
2970
2967
|
}
|
|
@@ -2979,17 +2976,121 @@ class P2pRtcManager {
|
|
|
2979
2976
|
browserVersion >= 14 &&
|
|
2980
2977
|
this._features.deprioritizeH264OnSafari;
|
|
2981
2978
|
const session = new Session({
|
|
2982
|
-
peerConnectionId,
|
|
2983
2979
|
clientId,
|
|
2984
2980
|
peerConnectionConfig,
|
|
2985
2981
|
bandwidth: initialBandwidth,
|
|
2986
2982
|
deprioritizeH264Encoding,
|
|
2987
2983
|
incrementAnalyticMetric: (metric) => this.analytics[metric]++,
|
|
2988
2984
|
});
|
|
2989
|
-
this.peerConnections[
|
|
2985
|
+
this.peerConnections[clientId] = session;
|
|
2990
2986
|
setTimeout(() => this._emit(rtcManagerEvents.NEW_PC), 0);
|
|
2991
2987
|
this.analytics.numNewPc++;
|
|
2992
2988
|
const { pc } = session;
|
|
2989
|
+
pc.onicegatheringstatechange = (event) => {
|
|
2990
|
+
const connection = event.target;
|
|
2991
|
+
switch (connection.iceGatheringState) {
|
|
2992
|
+
case "gathering":
|
|
2993
|
+
if (this._icePublicIPGatheringTimeoutID)
|
|
2994
|
+
clearTimeout(this._icePublicIPGatheringTimeoutID);
|
|
2995
|
+
this._icePublicIPGatheringTimeoutID = setTimeout(() => {
|
|
2996
|
+
if (!session.publicHostCandidateSeen &&
|
|
2997
|
+
!session.relayCandidateSeen &&
|
|
2998
|
+
!session.serverReflexiveCandidateSeen) {
|
|
2999
|
+
if (pc.iceConnectionState !== "connected" && pc.iceConnectionState !== "completed")
|
|
3000
|
+
this.analytics.numIceNoPublicIpGatheredIn3sec++;
|
|
3001
|
+
}
|
|
3002
|
+
}, ICE_PUBLIC_IP_GATHERING_TIMEOUT);
|
|
3003
|
+
break;
|
|
3004
|
+
case "complete":
|
|
3005
|
+
if (this._icePublicIPGatheringTimeoutID)
|
|
3006
|
+
clearTimeout(this._icePublicIPGatheringTimeoutID);
|
|
3007
|
+
this._icePublicIPGatheringTimeoutID = null;
|
|
3008
|
+
break;
|
|
3009
|
+
}
|
|
3010
|
+
};
|
|
3011
|
+
pc.onicecandidate = (event) => {
|
|
3012
|
+
if (event.candidate) {
|
|
3013
|
+
if (event.candidate.type === "relayed") {
|
|
3014
|
+
this.analytics.P2PRelayedIceCandidate++;
|
|
3015
|
+
}
|
|
3016
|
+
switch (event.candidate.type) {
|
|
3017
|
+
case "host":
|
|
3018
|
+
const address = event.candidate.address;
|
|
3019
|
+
if (!address) {
|
|
3020
|
+
break;
|
|
3021
|
+
}
|
|
3022
|
+
try {
|
|
3023
|
+
if (ipRegex.v4({ exact: true }).test(address)) {
|
|
3024
|
+
const ipv4 = checkIp(address);
|
|
3025
|
+
if (ipv4.isPublicIp)
|
|
3026
|
+
session.publicHostCandidateSeen = true;
|
|
3027
|
+
}
|
|
3028
|
+
else if (ipRegex.v6({ exact: true }).test(address.replace(/^\[(.*)\]/, "$1"))) {
|
|
3029
|
+
const ipv6 = new ipAddress.Address6(address.replace(/^\[(.*)\]/, "$1"));
|
|
3030
|
+
session.ipv6HostCandidateSeen = true;
|
|
3031
|
+
if (ipv6.getScope() === "Global") {
|
|
3032
|
+
session.publicHostCandidateSeen = true;
|
|
3033
|
+
}
|
|
3034
|
+
if (ipv6.isTeredo()) {
|
|
3035
|
+
session.ipv6HostCandidateTeredoSeen = true;
|
|
3036
|
+
}
|
|
3037
|
+
if (ipv6.is6to4()) {
|
|
3038
|
+
session.ipv6HostCandidate6to4Seen = true;
|
|
3039
|
+
}
|
|
3040
|
+
}
|
|
3041
|
+
else {
|
|
3042
|
+
const uuidv4 = address.replace(/.local/, "");
|
|
3043
|
+
if (uuidv4 && validate(uuidv4, 4)) {
|
|
3044
|
+
session.mdnsHostCandidateSeen = true;
|
|
3045
|
+
}
|
|
3046
|
+
}
|
|
3047
|
+
}
|
|
3048
|
+
catch (error) {
|
|
3049
|
+
logger$6.info("Error during parsing candidates! Error: ", { error });
|
|
3050
|
+
}
|
|
3051
|
+
break;
|
|
3052
|
+
case "srflx":
|
|
3053
|
+
session.serverReflexiveCandidateSeen = true;
|
|
3054
|
+
break;
|
|
3055
|
+
case "relayed":
|
|
3056
|
+
case "relay":
|
|
3057
|
+
session.relayCandidateSeen = true;
|
|
3058
|
+
break;
|
|
3059
|
+
}
|
|
3060
|
+
this._emitServerEvent(RELAY_MESSAGES.ICE_CANDIDATE, {
|
|
3061
|
+
receiverId: clientId,
|
|
3062
|
+
message: event.candidate,
|
|
3063
|
+
});
|
|
3064
|
+
}
|
|
3065
|
+
else {
|
|
3066
|
+
this._emitServerEvent(RELAY_MESSAGES.ICE_END_OF_CANDIDATES, {
|
|
3067
|
+
receiverId: clientId,
|
|
3068
|
+
});
|
|
3069
|
+
if (!session.publicHostCandidateSeen &&
|
|
3070
|
+
!session.relayCandidateSeen &&
|
|
3071
|
+
!session.serverReflexiveCandidateSeen &&
|
|
3072
|
+
pc.iceConnectionState !== "connected" &&
|
|
3073
|
+
pc.iceConnectionState !== "completed") {
|
|
3074
|
+
this.analytics.numIceNoPublicIpGathered++;
|
|
3075
|
+
}
|
|
3076
|
+
if (session.ipv6HostCandidateSeen) {
|
|
3077
|
+
this.analytics.numIceIpv6Seen++;
|
|
3078
|
+
if (session.ipv6HostCandidate6to4Seen)
|
|
3079
|
+
this.analytics.numIceIpv6SixToFour++;
|
|
3080
|
+
if (session.ipv6HostCandidateTeredoSeen)
|
|
3081
|
+
this.analytics.numIceIpv6TeredoSeen++;
|
|
3082
|
+
}
|
|
3083
|
+
if (session.mdnsHostCandidateSeen)
|
|
3084
|
+
this.analytics.numIceMdnsSeen++;
|
|
3085
|
+
}
|
|
3086
|
+
};
|
|
3087
|
+
pc.onnegotiationneeded = () => {
|
|
3088
|
+
if (pc.iceConnectionState === "new" || !session.connectionStatus) {
|
|
3089
|
+
return;
|
|
3090
|
+
}
|
|
3091
|
+
logger$6.info(`onnegotiationneeded client ${clientId}`);
|
|
3092
|
+
this._negotiatePeerConnection({ clientId, session });
|
|
3093
|
+
};
|
|
2993
3094
|
pc.ontrack = (event) => {
|
|
2994
3095
|
const stream = event.streams[0];
|
|
2995
3096
|
if (!stream) {
|
|
@@ -3121,16 +3222,22 @@ class P2pRtcManager {
|
|
|
3121
3222
|
});
|
|
3122
3223
|
}
|
|
3123
3224
|
}
|
|
3225
|
+
if (this._features.increaseIncomingMediaBufferOn) {
|
|
3226
|
+
this._setJitterBufferTarget(pc);
|
|
3227
|
+
}
|
|
3228
|
+
if (((_b = (_a = this._localCameraStream) === null || _a === void 0 ? void 0 : _a.getVideoTracks()) === null || _b === void 0 ? void 0 : _b.length) && this._stoppedVideoTrack) {
|
|
3229
|
+
pc.addTrack(this._stoppedVideoTrack, this._localCameraStream);
|
|
3230
|
+
}
|
|
3124
3231
|
return session;
|
|
3125
3232
|
}
|
|
3126
|
-
_cleanup(
|
|
3127
|
-
const session = this._getSession(
|
|
3233
|
+
_cleanup(clientId) {
|
|
3234
|
+
const session = this._getSession(clientId);
|
|
3128
3235
|
if (!session) {
|
|
3129
|
-
logger$6.warn("No RTCPeerConnection in RTCManager.disconnect()",
|
|
3236
|
+
logger$6.warn("No RTCPeerConnection in RTCManager.disconnect()", clientId);
|
|
3130
3237
|
return;
|
|
3131
3238
|
}
|
|
3132
3239
|
session.close();
|
|
3133
|
-
delete this.peerConnections[
|
|
3240
|
+
delete this.peerConnections[clientId];
|
|
3134
3241
|
}
|
|
3135
3242
|
_forEachPeerConnection(func) {
|
|
3136
3243
|
Object.values(this.peerConnections).forEach((peerConnection) => {
|
|
@@ -3231,7 +3338,7 @@ class P2pRtcManager {
|
|
|
3231
3338
|
else {
|
|
3232
3339
|
initialBandwidth = this._changeBandwidthForAllClients(true);
|
|
3233
3340
|
}
|
|
3234
|
-
session = this.
|
|
3341
|
+
session = this._createSession({
|
|
3235
3342
|
clientId,
|
|
3236
3343
|
initialBandwidth,
|
|
3237
3344
|
isOfferer: true,
|
|
@@ -3395,128 +3502,6 @@ class P2pRtcManager {
|
|
|
3395
3502
|
});
|
|
3396
3503
|
return bandwidth;
|
|
3397
3504
|
}
|
|
3398
|
-
_createP2pSession({ clientId, initialBandwidth, isOfferer = false, }) {
|
|
3399
|
-
var _a, _b;
|
|
3400
|
-
const session = this._createSession({
|
|
3401
|
-
peerConnectionId: clientId,
|
|
3402
|
-
clientId,
|
|
3403
|
-
initialBandwidth,
|
|
3404
|
-
isOfferer,
|
|
3405
|
-
});
|
|
3406
|
-
const pc = session.pc;
|
|
3407
|
-
if (this._features.increaseIncomingMediaBufferOn) {
|
|
3408
|
-
this._setJitterBufferTarget(pc);
|
|
3409
|
-
}
|
|
3410
|
-
if (((_b = (_a = this._localCameraStream) === null || _a === void 0 ? void 0 : _a.getVideoTracks()) === null || _b === void 0 ? void 0 : _b.length) && this._stoppedVideoTrack) {
|
|
3411
|
-
pc.addTrack(this._stoppedVideoTrack, this._localCameraStream);
|
|
3412
|
-
}
|
|
3413
|
-
pc.onicegatheringstatechange = (event) => {
|
|
3414
|
-
const connection = event.target;
|
|
3415
|
-
switch (connection.iceGatheringState) {
|
|
3416
|
-
case "gathering":
|
|
3417
|
-
if (this._icePublicIPGatheringTimeoutID)
|
|
3418
|
-
clearTimeout(this._icePublicIPGatheringTimeoutID);
|
|
3419
|
-
this._icePublicIPGatheringTimeoutID = setTimeout(() => {
|
|
3420
|
-
if (!session.publicHostCandidateSeen &&
|
|
3421
|
-
!session.relayCandidateSeen &&
|
|
3422
|
-
!session.serverReflexiveCandidateSeen) {
|
|
3423
|
-
if (pc.iceConnectionState !== "connected" && pc.iceConnectionState !== "completed")
|
|
3424
|
-
this.analytics.numIceNoPublicIpGatheredIn3sec++;
|
|
3425
|
-
}
|
|
3426
|
-
}, ICE_PUBLIC_IP_GATHERING_TIMEOUT);
|
|
3427
|
-
break;
|
|
3428
|
-
case "complete":
|
|
3429
|
-
if (this._icePublicIPGatheringTimeoutID)
|
|
3430
|
-
clearTimeout(this._icePublicIPGatheringTimeoutID);
|
|
3431
|
-
this._icePublicIPGatheringTimeoutID = null;
|
|
3432
|
-
break;
|
|
3433
|
-
}
|
|
3434
|
-
};
|
|
3435
|
-
pc.onicecandidate = (event) => {
|
|
3436
|
-
if (event.candidate) {
|
|
3437
|
-
if (event.candidate.type === "relayed") {
|
|
3438
|
-
this.analytics.P2PRelayedIceCandidate++;
|
|
3439
|
-
}
|
|
3440
|
-
switch (event.candidate.type) {
|
|
3441
|
-
case "host":
|
|
3442
|
-
const address = event.candidate.address;
|
|
3443
|
-
if (!address) {
|
|
3444
|
-
break;
|
|
3445
|
-
}
|
|
3446
|
-
try {
|
|
3447
|
-
if (ipRegex.v4({ exact: true }).test(address)) {
|
|
3448
|
-
const ipv4 = checkIp(address);
|
|
3449
|
-
if (ipv4.isPublicIp)
|
|
3450
|
-
session.publicHostCandidateSeen = true;
|
|
3451
|
-
}
|
|
3452
|
-
else if (ipRegex.v6({ exact: true }).test(address.replace(/^\[(.*)\]/, "$1"))) {
|
|
3453
|
-
const ipv6 = new ipAddress.Address6(address.replace(/^\[(.*)\]/, "$1"));
|
|
3454
|
-
session.ipv6HostCandidateSeen = true;
|
|
3455
|
-
if (ipv6.getScope() === "Global") {
|
|
3456
|
-
session.publicHostCandidateSeen = true;
|
|
3457
|
-
}
|
|
3458
|
-
if (ipv6.isTeredo()) {
|
|
3459
|
-
session.ipv6HostCandidateTeredoSeen = true;
|
|
3460
|
-
}
|
|
3461
|
-
if (ipv6.is6to4()) {
|
|
3462
|
-
session.ipv6HostCandidate6to4Seen = true;
|
|
3463
|
-
}
|
|
3464
|
-
}
|
|
3465
|
-
else {
|
|
3466
|
-
const uuidv4 = address.replace(/.local/, "");
|
|
3467
|
-
if (uuidv4 && validate(uuidv4, 4)) {
|
|
3468
|
-
session.mdnsHostCandidateSeen = true;
|
|
3469
|
-
}
|
|
3470
|
-
}
|
|
3471
|
-
}
|
|
3472
|
-
catch (error) {
|
|
3473
|
-
logger$6.info("Error during parsing candidates! Error: ", { error });
|
|
3474
|
-
}
|
|
3475
|
-
break;
|
|
3476
|
-
case "srflx":
|
|
3477
|
-
session.serverReflexiveCandidateSeen = true;
|
|
3478
|
-
break;
|
|
3479
|
-
case "relayed":
|
|
3480
|
-
case "relay":
|
|
3481
|
-
session.relayCandidateSeen = true;
|
|
3482
|
-
break;
|
|
3483
|
-
}
|
|
3484
|
-
this._emitServerEvent(RELAY_MESSAGES.ICE_CANDIDATE, {
|
|
3485
|
-
receiverId: clientId,
|
|
3486
|
-
message: event.candidate,
|
|
3487
|
-
});
|
|
3488
|
-
}
|
|
3489
|
-
else {
|
|
3490
|
-
this._emitServerEvent(RELAY_MESSAGES.ICE_END_OF_CANDIDATES, {
|
|
3491
|
-
receiverId: clientId,
|
|
3492
|
-
});
|
|
3493
|
-
if (!session.publicHostCandidateSeen &&
|
|
3494
|
-
!session.relayCandidateSeen &&
|
|
3495
|
-
!session.serverReflexiveCandidateSeen &&
|
|
3496
|
-
pc.iceConnectionState !== "connected" &&
|
|
3497
|
-
pc.iceConnectionState !== "completed") {
|
|
3498
|
-
this.analytics.numIceNoPublicIpGathered++;
|
|
3499
|
-
}
|
|
3500
|
-
if (session.ipv6HostCandidateSeen) {
|
|
3501
|
-
this.analytics.numIceIpv6Seen++;
|
|
3502
|
-
if (session.ipv6HostCandidate6to4Seen)
|
|
3503
|
-
this.analytics.numIceIpv6SixToFour++;
|
|
3504
|
-
if (session.ipv6HostCandidateTeredoSeen)
|
|
3505
|
-
this.analytics.numIceIpv6TeredoSeen++;
|
|
3506
|
-
}
|
|
3507
|
-
if (session.mdnsHostCandidateSeen)
|
|
3508
|
-
this.analytics.numIceMdnsSeen++;
|
|
3509
|
-
}
|
|
3510
|
-
};
|
|
3511
|
-
pc.onnegotiationneeded = () => {
|
|
3512
|
-
if (pc.iceConnectionState === "new" || !session.connectionStatus) {
|
|
3513
|
-
return;
|
|
3514
|
-
}
|
|
3515
|
-
logger$6.info(`onnegotiationneeded client ${clientId}`);
|
|
3516
|
-
this._negotiatePeerConnection({ clientId, session });
|
|
3517
|
-
};
|
|
3518
|
-
return session;
|
|
3519
|
-
}
|
|
3520
3505
|
acceptNewStream({ streamId, clientId }) {
|
|
3521
3506
|
logger$6.info("acceptNewStream() [streamId: %s}, clientId: %s]", streamId, clientId);
|
|
3522
3507
|
let session = this._getSession(clientId);
|
|
@@ -3530,7 +3515,7 @@ class P2pRtcManager {
|
|
|
3530
3515
|
else {
|
|
3531
3516
|
initialBandwidth = this._changeBandwidthForAllClients(true);
|
|
3532
3517
|
}
|
|
3533
|
-
session = this.
|
|
3518
|
+
session = this._createSession({
|
|
3534
3519
|
clientId,
|
|
3535
3520
|
initialBandwidth,
|
|
3536
3521
|
isOfferer: false,
|
|
@@ -6762,11 +6747,11 @@ class BandwidthTester extends EventEmitter {
|
|
|
6762
6747
|
const wsUrl = `wss://${host}`;
|
|
6763
6748
|
this._vegaConnection = new VegaConnection(wsUrl, "whereby-sfu#bw-test-v1");
|
|
6764
6749
|
this._vegaConnection.on("open", () => this._start());
|
|
6765
|
-
this._vegaConnection.on("close", () => this.close());
|
|
6750
|
+
this._vegaConnection.on("close", () => this.close(true));
|
|
6766
6751
|
this._vegaConnection.on("message", (message) => this._onMessage(message));
|
|
6767
6752
|
this._startTimeout();
|
|
6768
6753
|
}
|
|
6769
|
-
close() {
|
|
6754
|
+
close(vegaConnectionClosed) {
|
|
6770
6755
|
logger$1.info("close()");
|
|
6771
6756
|
this.closed = true;
|
|
6772
6757
|
if (!!this._timeout || Date.now() - this._startTime < 750) {
|
|
@@ -6774,6 +6759,12 @@ class BandwidthTester extends EventEmitter {
|
|
|
6774
6759
|
error: true,
|
|
6775
6760
|
});
|
|
6776
6761
|
}
|
|
6762
|
+
else if (vegaConnectionClosed && this._resultTimeout) {
|
|
6763
|
+
this.emit("result", {
|
|
6764
|
+
error: true,
|
|
6765
|
+
});
|
|
6766
|
+
clearTimeout(this._resultTimeout);
|
|
6767
|
+
}
|
|
6777
6768
|
this._clearTimeouts();
|
|
6778
6769
|
clearInterval(this._drawInterval);
|
|
6779
6770
|
this._drawInterval = null;
|
|
@@ -7116,9 +7107,7 @@ function buildDeviceList({ busyDeviceIds, devices, kind }) {
|
|
|
7116
7107
|
label: `${busyDeviceIds.includes(d.deviceId) ? "(busy) " : ""}${d.label || d.deviceId.slice(0, 5)}`,
|
|
7117
7108
|
busy: busyDeviceIds.includes(d.deviceId),
|
|
7118
7109
|
}));
|
|
7119
|
-
return deviceList && deviceList.length !== 0
|
|
7120
|
-
? deviceList
|
|
7121
|
-
: [{ [idFieldsByKind[kind]]: "", label: "Default" }];
|
|
7110
|
+
return deviceList && deviceList.length !== 0 ? deviceList : [{ [idFieldsByKind[kind]]: "", label: "Default" }];
|
|
7122
7111
|
}
|
|
7123
7112
|
function getUserMedia(constraints) {
|
|
7124
7113
|
if (!constraints.audio && !constraints.video) {
|
package/dist/index.d.cts
CHANGED
|
@@ -506,8 +506,8 @@ type GetMediaConstraintsOptions = {
|
|
|
506
506
|
};
|
|
507
507
|
type GetConstraintsOptions = {
|
|
508
508
|
devices: MediaDeviceInfo[];
|
|
509
|
-
audioId?: boolean | string;
|
|
510
|
-
videoId?: boolean | string;
|
|
509
|
+
audioId?: boolean | string | null;
|
|
510
|
+
videoId?: boolean | string | null;
|
|
511
511
|
type?: "ideal" | "exact";
|
|
512
512
|
options: Omit<GetMediaConstraintsOptions, "preferredDeviceIds">;
|
|
513
513
|
};
|
|
@@ -515,6 +515,11 @@ type GetStreamOptions = {
|
|
|
515
515
|
replaceStream?: MediaStream;
|
|
516
516
|
fallback?: boolean;
|
|
517
517
|
};
|
|
518
|
+
interface BuildDeviceListOptions {
|
|
519
|
+
devices: MediaDeviceInfo[];
|
|
520
|
+
busyDeviceIds: string[];
|
|
521
|
+
kind: MediaDeviceKind;
|
|
522
|
+
}
|
|
518
523
|
type GetStreamResult = {
|
|
519
524
|
error?: unknown;
|
|
520
525
|
replacedTracks?: MediaStreamTrack[];
|
|
@@ -1136,7 +1141,7 @@ declare class BandwidthTester extends EventEmitter {
|
|
|
1136
1141
|
features?: any;
|
|
1137
1142
|
});
|
|
1138
1143
|
start(runTime?: number): void;
|
|
1139
|
-
close(): void;
|
|
1144
|
+
close(vegaConnectionClosed?: boolean): void;
|
|
1140
1145
|
_start(): Promise<void>;
|
|
1141
1146
|
_createTransport(send: any): Promise<void>;
|
|
1142
1147
|
_getTestTrack(): any;
|
|
@@ -1163,22 +1168,33 @@ declare class NoDevicesError extends Error {
|
|
|
1163
1168
|
constructor(...args: any);
|
|
1164
1169
|
}
|
|
1165
1170
|
declare function enumerate(): Promise<MediaDeviceInfo[]>;
|
|
1166
|
-
declare function buildDeviceList({ busyDeviceIds, devices, kind }:
|
|
1171
|
+
declare function buildDeviceList({ busyDeviceIds, devices, kind }: BuildDeviceListOptions): {
|
|
1172
|
+
[x: string]: string | boolean;
|
|
1173
|
+
label: string;
|
|
1174
|
+
busy: boolean;
|
|
1175
|
+
}[] | {
|
|
1176
|
+
[x: string]: string;
|
|
1177
|
+
label: string;
|
|
1178
|
+
}[];
|
|
1167
1179
|
declare function getUserMedia(constraints: any): Promise<MediaStream>;
|
|
1168
1180
|
declare function getDeviceData({ audioTrack, videoTrack, devices, stoppedVideoTrack, lastAudioId, lastVideoId, }: {
|
|
1169
1181
|
audioTrack?: MediaStreamTrack | null;
|
|
1170
1182
|
videoTrack?: MediaStreamTrack | null;
|
|
1171
1183
|
devices: MediaDeviceInfo[];
|
|
1172
|
-
stoppedVideoTrack?:
|
|
1184
|
+
stoppedVideoTrack?: MediaStreamTrack;
|
|
1173
1185
|
lastAudioId?: string | undefined;
|
|
1174
1186
|
lastVideoId?: string | undefined;
|
|
1175
1187
|
}): GetDeviceDataResult;
|
|
1176
1188
|
declare function stopStreamTracks(stream: MediaStream, only?: "audio" | "video" | false): void;
|
|
1177
1189
|
declare function replaceTracksInStream(stream: MediaStream, newStream: MediaStream, only: "audio" | "video" | false): MediaStreamTrack[];
|
|
1178
|
-
declare function getStream(constraintOpt:
|
|
1190
|
+
declare function getStream(constraintOpt: GetConstraintsOptions, { replaceStream, fallback }?: GetStreamOptions): Promise<GetStreamResult>;
|
|
1179
1191
|
declare function hasGetDisplayMedia(): boolean;
|
|
1180
1192
|
declare function getDisplayMedia(constraints?: DisplayMediaStreamOptions, contentHint?: string): Promise<MediaStream>;
|
|
1181
|
-
declare function compareLocalDevices(before: MediaDeviceInfo[], after: MediaDeviceInfo[]):
|
|
1193
|
+
declare function compareLocalDevices(before: MediaDeviceInfo[], after: MediaDeviceInfo[]): Record<MediaDeviceKind, {
|
|
1194
|
+
removed: Record<string, MediaDeviceInfo>;
|
|
1195
|
+
added: Record<string, MediaDeviceInfo>;
|
|
1196
|
+
changed: Record<string, MediaDeviceInfo>;
|
|
1197
|
+
}>;
|
|
1182
1198
|
declare function getUpdatedDevices({ oldDevices, newDevices, currentAudioId, currentVideoId, currentSpeakerId, }: {
|
|
1183
1199
|
oldDevices: MediaDeviceInfo[];
|
|
1184
1200
|
newDevices: MediaDeviceInfo[];
|
|
@@ -1188,7 +1204,6 @@ declare function getUpdatedDevices({ oldDevices, newDevices, currentAudioId, cur
|
|
|
1188
1204
|
}): GetUpdatedDevicesResult;
|
|
1189
1205
|
|
|
1190
1206
|
interface P2PSessionOptions {
|
|
1191
|
-
peerConnectionId: string;
|
|
1192
1207
|
clientId: string;
|
|
1193
1208
|
bandwidth: number;
|
|
1194
1209
|
peerConnectionConfig: RTCConfiguration;
|
|
@@ -1196,7 +1211,6 @@ interface P2PSessionOptions {
|
|
|
1196
1211
|
incrementAnalyticMetric: P2PIncrementAnalyticMetric;
|
|
1197
1212
|
}
|
|
1198
1213
|
declare class Session {
|
|
1199
|
-
peerConnectionId: any;
|
|
1200
1214
|
relayCandidateSeen: boolean;
|
|
1201
1215
|
serverReflexiveCandidateSeen: boolean;
|
|
1202
1216
|
publicHostCandidateSeen: boolean;
|
|
@@ -1222,7 +1236,7 @@ declare class Session {
|
|
|
1222
1236
|
srdComplete: any;
|
|
1223
1237
|
_incrementAnalyticMetric: P2PIncrementAnalyticMetric;
|
|
1224
1238
|
pendingReplaceTrackActions: (() => Promise<void>)[];
|
|
1225
|
-
constructor({
|
|
1239
|
+
constructor({ clientId, bandwidth, peerConnectionConfig, deprioritizeH264Encoding, incrementAnalyticMetric, }: P2PSessionOptions);
|
|
1226
1240
|
addStream(stream: MediaStream): void;
|
|
1227
1241
|
addTrack(track: MediaStreamTrack, stream?: MediaStream): void;
|
|
1228
1242
|
removeTrack(track: MediaStreamTrack): void;
|
|
@@ -1240,7 +1254,6 @@ declare class Session {
|
|
|
1240
1254
|
}
|
|
1241
1255
|
|
|
1242
1256
|
interface CreateSessionOptions {
|
|
1243
|
-
peerConnectionId: string;
|
|
1244
1257
|
clientId: string;
|
|
1245
1258
|
initialBandwidth: number;
|
|
1246
1259
|
isOfferer: boolean;
|
|
@@ -1342,9 +1355,9 @@ declare class P2pRtcManager implements RtcManager {
|
|
|
1342
1355
|
_setJitterBufferTarget(pc: RTCPeerConnection): void;
|
|
1343
1356
|
_emitServerEvent(eventName: string, data?: any): void;
|
|
1344
1357
|
_emit(eventName: string, data?: any): void;
|
|
1345
|
-
_getSession(
|
|
1346
|
-
_createSession({ clientId, initialBandwidth, isOfferer
|
|
1347
|
-
_cleanup(
|
|
1358
|
+
_getSession(clientId: string): Session | null;
|
|
1359
|
+
_createSession({ clientId, initialBandwidth, isOfferer }: CreateSessionOptions): Session;
|
|
1360
|
+
_cleanup(clientId: string): void;
|
|
1348
1361
|
_forEachPeerConnection(func: any): void;
|
|
1349
1362
|
_addStreamToPeerConnections(stream: MediaStream): void;
|
|
1350
1363
|
_addTrackToPeerConnections(track: MediaStreamTrack, stream?: MediaStream): void;
|
|
@@ -1361,11 +1374,6 @@ declare class P2pRtcManager implements RtcManager {
|
|
|
1361
1374
|
_negotiatePeerConnection({ clientId, session, constraints, isInitialOffer, }: NegotiatePeerConnectionOptions): void;
|
|
1362
1375
|
_withForcedRenegotiation(session: Session, action: any): void;
|
|
1363
1376
|
_changeBandwidthForAllClients(isJoining: boolean): number;
|
|
1364
|
-
_createP2pSession({ clientId, initialBandwidth, isOfferer, }: {
|
|
1365
|
-
clientId: string;
|
|
1366
|
-
initialBandwidth: number;
|
|
1367
|
-
isOfferer: boolean;
|
|
1368
|
-
}): Session;
|
|
1369
1377
|
acceptNewStream({ streamId, clientId }: {
|
|
1370
1378
|
streamId: string;
|
|
1371
1379
|
clientId: string;
|
|
@@ -1944,4 +1952,4 @@ declare const STREAM_TYPES: {
|
|
|
1944
1952
|
};
|
|
1945
1953
|
|
|
1946
1954
|
export { ADDITIONAL_SCREEN_SHARE_SETTINGS, AUDIO_SETTINGS, BandwidthTester, CAMERA_STREAM_ID, EVENTS, KNOCK_MESSAGES, KalmanFilter, Logger, MEDIA_JITTER_BUFFER_TARGET, NoDevicesError, P2pRtcManager, PROTOCOL_ERRORS, PROTOCOL_EVENTS, PROTOCOL_REQUESTS, PROTOCOL_RESPONSES, RELAY_MESSAGES, ReconnectManager, RtcEventNames, RtcManagerDispatcher, 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, 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, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceTracksInStream, _default as rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, sortCodecs, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, trackAnnotations, turnServerOverride, variance };
|
|
1947
|
-
export type { AddCameraStreamOptions, AddSpotlightRequest, AudioEnableRequest, AudioEnableRequestedEvent, AudioEnabledEvent, BreakoutConfig, BreakoutGroupJoinedEvent, BreakoutSessionUpdatedEvent, CannotJoinUnclaimedRoomError, ChatMessage, ClearableTimeout, ClientKickedEvent, ClientLeftEvent, ClientMetadataPayload, ClientMetadataReceivedEvent, ClientRole, ClientUnableToJoinEvent, CloudRecordingStartedEvent, Codec, Credentials, 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, RemoveScreenshareStreamOptions, RemoveSpotlightRequest, RoleName, RoomConcurrencyControlsError, RoomEmptyError, RoomFullError, RoomJoinPermissionDeniedError, RoomJoinedErrors, RoomJoinedEvent, RoomJoinedSuccess, RoomKnockedEvent, RoomLockedError, RoomLockedEvent, RoomMeetingTimeExhaustedError, RoomMode, RoomSessionEndedEvent, RtcClientConnectionStatusChangedPayload, RtcEventEmitter, RtcEvents, RtcLocalStreamTrackAddedPayload, RtcLocalStreamTrackRemovedPayload, RtcManager, RtcManagerCreatedPayload, RtcManagerOptions, RtcStreamAddedPayload, ScreenshareStartedEvent, ScreenshareStoppedEvent, SendClientMetadataRequest, SignalClient, SignalEvents, SignalIceCandidateMessage, SignalIceEndOfCandidatesMessage, SignalIceServer, SignalKnocker, SignalMediaServerConfig, SignalRTCSessionDescription, SignalReadyToReceiveOfferMessage, SignalRequests, SignalRoom, SignalSDPMessage, SignalSFUServer, SignalTurnServer, SocketConf, SocketManager, Spotlight, SpotlightAddedEvent, SpotlightRemovedEvent, StatsMonitorOptions, StatsMonitorState, StatsSubscription, TurnTransportProtocol, UniqueRoleAlreadyInRoomError, UpdatedDeviceInfo, UpdatedDevicesInfo, VegaRtcManagerOptions, VideoEnableRequest, VideoEnableRequestedEvent, VideoEnabledEvent, WebRTCProvider };
|
|
1955
|
+
export type { AddCameraStreamOptions, AddSpotlightRequest, AudioEnableRequest, AudioEnableRequestedEvent, AudioEnabledEvent, BreakoutConfig, BreakoutGroupJoinedEvent, BreakoutSessionUpdatedEvent, BuildDeviceListOptions, CannotJoinUnclaimedRoomError, ChatMessage, ClearableTimeout, ClientKickedEvent, ClientLeftEvent, ClientMetadataPayload, ClientMetadataReceivedEvent, ClientRole, ClientUnableToJoinEvent, CloudRecordingStartedEvent, Codec, Credentials, 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, RemoveScreenshareStreamOptions, RemoveSpotlightRequest, RoleName, RoomConcurrencyControlsError, RoomEmptyError, RoomFullError, RoomJoinPermissionDeniedError, RoomJoinedErrors, RoomJoinedEvent, RoomJoinedSuccess, RoomKnockedEvent, RoomLockedError, RoomLockedEvent, RoomMeetingTimeExhaustedError, RoomMode, RoomSessionEndedEvent, RtcClientConnectionStatusChangedPayload, RtcEventEmitter, RtcEvents, RtcLocalStreamTrackAddedPayload, RtcLocalStreamTrackRemovedPayload, RtcManager, RtcManagerCreatedPayload, RtcManagerOptions, RtcStreamAddedPayload, ScreenshareStartedEvent, ScreenshareStoppedEvent, SendClientMetadataRequest, SignalClient, SignalEvents, SignalIceCandidateMessage, SignalIceEndOfCandidatesMessage, SignalIceServer, SignalKnocker, SignalMediaServerConfig, SignalRTCSessionDescription, SignalReadyToReceiveOfferMessage, SignalRequests, SignalRoom, SignalSDPMessage, SignalSFUServer, SignalTurnServer, SocketConf, SocketManager, Spotlight, SpotlightAddedEvent, SpotlightRemovedEvent, StatsMonitorOptions, StatsMonitorState, StatsSubscription, TurnTransportProtocol, UniqueRoleAlreadyInRoomError, UpdatedDeviceInfo, UpdatedDevicesInfo, VegaRtcManagerOptions, VideoEnableRequest, VideoEnableRequestedEvent, VideoEnabledEvent, WebRTCProvider };
|
package/dist/index.d.mts
CHANGED
|
@@ -506,8 +506,8 @@ type GetMediaConstraintsOptions = {
|
|
|
506
506
|
};
|
|
507
507
|
type GetConstraintsOptions = {
|
|
508
508
|
devices: MediaDeviceInfo[];
|
|
509
|
-
audioId?: boolean | string;
|
|
510
|
-
videoId?: boolean | string;
|
|
509
|
+
audioId?: boolean | string | null;
|
|
510
|
+
videoId?: boolean | string | null;
|
|
511
511
|
type?: "ideal" | "exact";
|
|
512
512
|
options: Omit<GetMediaConstraintsOptions, "preferredDeviceIds">;
|
|
513
513
|
};
|
|
@@ -515,6 +515,11 @@ type GetStreamOptions = {
|
|
|
515
515
|
replaceStream?: MediaStream;
|
|
516
516
|
fallback?: boolean;
|
|
517
517
|
};
|
|
518
|
+
interface BuildDeviceListOptions {
|
|
519
|
+
devices: MediaDeviceInfo[];
|
|
520
|
+
busyDeviceIds: string[];
|
|
521
|
+
kind: MediaDeviceKind;
|
|
522
|
+
}
|
|
518
523
|
type GetStreamResult = {
|
|
519
524
|
error?: unknown;
|
|
520
525
|
replacedTracks?: MediaStreamTrack[];
|
|
@@ -1136,7 +1141,7 @@ declare class BandwidthTester extends EventEmitter {
|
|
|
1136
1141
|
features?: any;
|
|
1137
1142
|
});
|
|
1138
1143
|
start(runTime?: number): void;
|
|
1139
|
-
close(): void;
|
|
1144
|
+
close(vegaConnectionClosed?: boolean): void;
|
|
1140
1145
|
_start(): Promise<void>;
|
|
1141
1146
|
_createTransport(send: any): Promise<void>;
|
|
1142
1147
|
_getTestTrack(): any;
|
|
@@ -1163,22 +1168,33 @@ declare class NoDevicesError extends Error {
|
|
|
1163
1168
|
constructor(...args: any);
|
|
1164
1169
|
}
|
|
1165
1170
|
declare function enumerate(): Promise<MediaDeviceInfo[]>;
|
|
1166
|
-
declare function buildDeviceList({ busyDeviceIds, devices, kind }:
|
|
1171
|
+
declare function buildDeviceList({ busyDeviceIds, devices, kind }: BuildDeviceListOptions): {
|
|
1172
|
+
[x: string]: string | boolean;
|
|
1173
|
+
label: string;
|
|
1174
|
+
busy: boolean;
|
|
1175
|
+
}[] | {
|
|
1176
|
+
[x: string]: string;
|
|
1177
|
+
label: string;
|
|
1178
|
+
}[];
|
|
1167
1179
|
declare function getUserMedia(constraints: any): Promise<MediaStream>;
|
|
1168
1180
|
declare function getDeviceData({ audioTrack, videoTrack, devices, stoppedVideoTrack, lastAudioId, lastVideoId, }: {
|
|
1169
1181
|
audioTrack?: MediaStreamTrack | null;
|
|
1170
1182
|
videoTrack?: MediaStreamTrack | null;
|
|
1171
1183
|
devices: MediaDeviceInfo[];
|
|
1172
|
-
stoppedVideoTrack?:
|
|
1184
|
+
stoppedVideoTrack?: MediaStreamTrack;
|
|
1173
1185
|
lastAudioId?: string | undefined;
|
|
1174
1186
|
lastVideoId?: string | undefined;
|
|
1175
1187
|
}): GetDeviceDataResult;
|
|
1176
1188
|
declare function stopStreamTracks(stream: MediaStream, only?: "audio" | "video" | false): void;
|
|
1177
1189
|
declare function replaceTracksInStream(stream: MediaStream, newStream: MediaStream, only: "audio" | "video" | false): MediaStreamTrack[];
|
|
1178
|
-
declare function getStream(constraintOpt:
|
|
1190
|
+
declare function getStream(constraintOpt: GetConstraintsOptions, { replaceStream, fallback }?: GetStreamOptions): Promise<GetStreamResult>;
|
|
1179
1191
|
declare function hasGetDisplayMedia(): boolean;
|
|
1180
1192
|
declare function getDisplayMedia(constraints?: DisplayMediaStreamOptions, contentHint?: string): Promise<MediaStream>;
|
|
1181
|
-
declare function compareLocalDevices(before: MediaDeviceInfo[], after: MediaDeviceInfo[]):
|
|
1193
|
+
declare function compareLocalDevices(before: MediaDeviceInfo[], after: MediaDeviceInfo[]): Record<MediaDeviceKind, {
|
|
1194
|
+
removed: Record<string, MediaDeviceInfo>;
|
|
1195
|
+
added: Record<string, MediaDeviceInfo>;
|
|
1196
|
+
changed: Record<string, MediaDeviceInfo>;
|
|
1197
|
+
}>;
|
|
1182
1198
|
declare function getUpdatedDevices({ oldDevices, newDevices, currentAudioId, currentVideoId, currentSpeakerId, }: {
|
|
1183
1199
|
oldDevices: MediaDeviceInfo[];
|
|
1184
1200
|
newDevices: MediaDeviceInfo[];
|
|
@@ -1188,7 +1204,6 @@ declare function getUpdatedDevices({ oldDevices, newDevices, currentAudioId, cur
|
|
|
1188
1204
|
}): GetUpdatedDevicesResult;
|
|
1189
1205
|
|
|
1190
1206
|
interface P2PSessionOptions {
|
|
1191
|
-
peerConnectionId: string;
|
|
1192
1207
|
clientId: string;
|
|
1193
1208
|
bandwidth: number;
|
|
1194
1209
|
peerConnectionConfig: RTCConfiguration;
|
|
@@ -1196,7 +1211,6 @@ interface P2PSessionOptions {
|
|
|
1196
1211
|
incrementAnalyticMetric: P2PIncrementAnalyticMetric;
|
|
1197
1212
|
}
|
|
1198
1213
|
declare class Session {
|
|
1199
|
-
peerConnectionId: any;
|
|
1200
1214
|
relayCandidateSeen: boolean;
|
|
1201
1215
|
serverReflexiveCandidateSeen: boolean;
|
|
1202
1216
|
publicHostCandidateSeen: boolean;
|
|
@@ -1222,7 +1236,7 @@ declare class Session {
|
|
|
1222
1236
|
srdComplete: any;
|
|
1223
1237
|
_incrementAnalyticMetric: P2PIncrementAnalyticMetric;
|
|
1224
1238
|
pendingReplaceTrackActions: (() => Promise<void>)[];
|
|
1225
|
-
constructor({
|
|
1239
|
+
constructor({ clientId, bandwidth, peerConnectionConfig, deprioritizeH264Encoding, incrementAnalyticMetric, }: P2PSessionOptions);
|
|
1226
1240
|
addStream(stream: MediaStream): void;
|
|
1227
1241
|
addTrack(track: MediaStreamTrack, stream?: MediaStream): void;
|
|
1228
1242
|
removeTrack(track: MediaStreamTrack): void;
|
|
@@ -1240,7 +1254,6 @@ declare class Session {
|
|
|
1240
1254
|
}
|
|
1241
1255
|
|
|
1242
1256
|
interface CreateSessionOptions {
|
|
1243
|
-
peerConnectionId: string;
|
|
1244
1257
|
clientId: string;
|
|
1245
1258
|
initialBandwidth: number;
|
|
1246
1259
|
isOfferer: boolean;
|
|
@@ -1342,9 +1355,9 @@ declare class P2pRtcManager implements RtcManager {
|
|
|
1342
1355
|
_setJitterBufferTarget(pc: RTCPeerConnection): void;
|
|
1343
1356
|
_emitServerEvent(eventName: string, data?: any): void;
|
|
1344
1357
|
_emit(eventName: string, data?: any): void;
|
|
1345
|
-
_getSession(
|
|
1346
|
-
_createSession({ clientId, initialBandwidth, isOfferer
|
|
1347
|
-
_cleanup(
|
|
1358
|
+
_getSession(clientId: string): Session | null;
|
|
1359
|
+
_createSession({ clientId, initialBandwidth, isOfferer }: CreateSessionOptions): Session;
|
|
1360
|
+
_cleanup(clientId: string): void;
|
|
1348
1361
|
_forEachPeerConnection(func: any): void;
|
|
1349
1362
|
_addStreamToPeerConnections(stream: MediaStream): void;
|
|
1350
1363
|
_addTrackToPeerConnections(track: MediaStreamTrack, stream?: MediaStream): void;
|
|
@@ -1361,11 +1374,6 @@ declare class P2pRtcManager implements RtcManager {
|
|
|
1361
1374
|
_negotiatePeerConnection({ clientId, session, constraints, isInitialOffer, }: NegotiatePeerConnectionOptions): void;
|
|
1362
1375
|
_withForcedRenegotiation(session: Session, action: any): void;
|
|
1363
1376
|
_changeBandwidthForAllClients(isJoining: boolean): number;
|
|
1364
|
-
_createP2pSession({ clientId, initialBandwidth, isOfferer, }: {
|
|
1365
|
-
clientId: string;
|
|
1366
|
-
initialBandwidth: number;
|
|
1367
|
-
isOfferer: boolean;
|
|
1368
|
-
}): Session;
|
|
1369
1377
|
acceptNewStream({ streamId, clientId }: {
|
|
1370
1378
|
streamId: string;
|
|
1371
1379
|
clientId: string;
|
|
@@ -1944,4 +1952,4 @@ declare const STREAM_TYPES: {
|
|
|
1944
1952
|
};
|
|
1945
1953
|
|
|
1946
1954
|
export { ADDITIONAL_SCREEN_SHARE_SETTINGS, AUDIO_SETTINGS, BandwidthTester, CAMERA_STREAM_ID, EVENTS, KNOCK_MESSAGES, KalmanFilter, Logger, MEDIA_JITTER_BUFFER_TARGET, NoDevicesError, P2pRtcManager, PROTOCOL_ERRORS, PROTOCOL_EVENTS, PROTOCOL_REQUESTS, PROTOCOL_RESPONSES, RELAY_MESSAGES, ReconnectManager, RtcEventNames, RtcManagerDispatcher, 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, 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, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceTracksInStream, _default as rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, sortCodecs, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, trackAnnotations, turnServerOverride, variance };
|
|
1947
|
-
export type { AddCameraStreamOptions, AddSpotlightRequest, AudioEnableRequest, AudioEnableRequestedEvent, AudioEnabledEvent, BreakoutConfig, BreakoutGroupJoinedEvent, BreakoutSessionUpdatedEvent, CannotJoinUnclaimedRoomError, ChatMessage, ClearableTimeout, ClientKickedEvent, ClientLeftEvent, ClientMetadataPayload, ClientMetadataReceivedEvent, ClientRole, ClientUnableToJoinEvent, CloudRecordingStartedEvent, Codec, Credentials, 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, RemoveScreenshareStreamOptions, RemoveSpotlightRequest, RoleName, RoomConcurrencyControlsError, RoomEmptyError, RoomFullError, RoomJoinPermissionDeniedError, RoomJoinedErrors, RoomJoinedEvent, RoomJoinedSuccess, RoomKnockedEvent, RoomLockedError, RoomLockedEvent, RoomMeetingTimeExhaustedError, RoomMode, RoomSessionEndedEvent, RtcClientConnectionStatusChangedPayload, RtcEventEmitter, RtcEvents, RtcLocalStreamTrackAddedPayload, RtcLocalStreamTrackRemovedPayload, RtcManager, RtcManagerCreatedPayload, RtcManagerOptions, RtcStreamAddedPayload, ScreenshareStartedEvent, ScreenshareStoppedEvent, SendClientMetadataRequest, SignalClient, SignalEvents, SignalIceCandidateMessage, SignalIceEndOfCandidatesMessage, SignalIceServer, SignalKnocker, SignalMediaServerConfig, SignalRTCSessionDescription, SignalReadyToReceiveOfferMessage, SignalRequests, SignalRoom, SignalSDPMessage, SignalSFUServer, SignalTurnServer, SocketConf, SocketManager, Spotlight, SpotlightAddedEvent, SpotlightRemovedEvent, StatsMonitorOptions, StatsMonitorState, StatsSubscription, TurnTransportProtocol, UniqueRoleAlreadyInRoomError, UpdatedDeviceInfo, UpdatedDevicesInfo, VegaRtcManagerOptions, VideoEnableRequest, VideoEnableRequestedEvent, VideoEnabledEvent, WebRTCProvider };
|
|
1955
|
+
export type { AddCameraStreamOptions, AddSpotlightRequest, AudioEnableRequest, AudioEnableRequestedEvent, AudioEnabledEvent, BreakoutConfig, BreakoutGroupJoinedEvent, BreakoutSessionUpdatedEvent, BuildDeviceListOptions, CannotJoinUnclaimedRoomError, ChatMessage, ClearableTimeout, ClientKickedEvent, ClientLeftEvent, ClientMetadataPayload, ClientMetadataReceivedEvent, ClientRole, ClientUnableToJoinEvent, CloudRecordingStartedEvent, Codec, Credentials, 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, RemoveScreenshareStreamOptions, RemoveSpotlightRequest, RoleName, RoomConcurrencyControlsError, RoomEmptyError, RoomFullError, RoomJoinPermissionDeniedError, RoomJoinedErrors, RoomJoinedEvent, RoomJoinedSuccess, RoomKnockedEvent, RoomLockedError, RoomLockedEvent, RoomMeetingTimeExhaustedError, RoomMode, RoomSessionEndedEvent, RtcClientConnectionStatusChangedPayload, RtcEventEmitter, RtcEvents, RtcLocalStreamTrackAddedPayload, RtcLocalStreamTrackRemovedPayload, RtcManager, RtcManagerCreatedPayload, RtcManagerOptions, RtcStreamAddedPayload, ScreenshareStartedEvent, ScreenshareStoppedEvent, SendClientMetadataRequest, SignalClient, SignalEvents, SignalIceCandidateMessage, SignalIceEndOfCandidatesMessage, SignalIceServer, SignalKnocker, SignalMediaServerConfig, SignalRTCSessionDescription, SignalReadyToReceiveOfferMessage, SignalRequests, SignalRoom, SignalSDPMessage, SignalSFUServer, SignalTurnServer, SocketConf, SocketManager, Spotlight, SpotlightAddedEvent, SpotlightRemovedEvent, StatsMonitorOptions, StatsMonitorState, StatsSubscription, TurnTransportProtocol, UniqueRoleAlreadyInRoomError, UpdatedDeviceInfo, UpdatedDevicesInfo, VegaRtcManagerOptions, VideoEnableRequest, VideoEnableRequestedEvent, VideoEnabledEvent, WebRTCProvider };
|