@opentok/client 2.32.0-alpha.6 → 2.32.0-alpha.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/js/opentok.js +66 -57
- package/dist/js/opentok.js.map +1 -1
- package/dist/js/opentok.min.js +4 -4
- package/dist/js/opentok.min.js.map +1 -1
- package/package.json +1 -1
package/dist/js/opentok.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license OpenTok.js 2.32.0
|
|
2
|
+
* @license OpenTok.js 2.32.0 e237ce0ca
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2010-2025 TokBox, Inc.
|
|
5
5
|
* Subject to the applicable Software Development Kit (SDK) License Agreement:
|
|
6
6
|
* https://www.vonage.com/legal/communications-apis/terms-of-use/
|
|
7
7
|
*
|
|
8
|
-
* Date:
|
|
8
|
+
* Date: Thu, 16 Oct 2025 08:06:18 GMT
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -8550,7 +8550,7 @@ function staticConfigFactory(_temp) {
|
|
|
8550
8550
|
_ref$axios = _ref.axios,
|
|
8551
8551
|
axios = _ref$axios === void 0 ? _axios.default : _ref$axios,
|
|
8552
8552
|
_ref$properties = _ref.properties,
|
|
8553
|
-
properties = _ref$properties === void 0 ? {"version":"v2.32.0","buildHash":"
|
|
8553
|
+
properties = _ref$properties === void 0 ? {"version":"v2.32.0","buildHash":"e237ce0ca","minimumVersion":{"firefox":52,"chrome":49},"debug":false,"websiteURL":"http://www.tokbox.com","configURL":"https://config.opentok.com","ipWhitelistConfigURL":"","cdnURL":"","loggingURL":"https://hlg.tokbox.com/prod","apiURL":"https://anvil.opentok.com","vonageApiURL":""} : _ref$properties;
|
|
8554
8554
|
/** @type builtInConfig */
|
|
8555
8555
|
const builtInConfig = (0, _cloneDeep.default)(properties);
|
|
8556
8556
|
/**
|
|
@@ -38251,7 +38251,8 @@ function SubscriberFactory(_ref2) {
|
|
|
38251
38251
|
case 12:
|
|
38252
38252
|
onRemoteStreamAdded.push({
|
|
38253
38253
|
webRTCStream,
|
|
38254
|
-
peerConnection
|
|
38254
|
+
peerConnection,
|
|
38255
|
+
sourceStreamId: peerConnection == null ? void 0 : peerConnection.getSourceStreamId()
|
|
38255
38256
|
});
|
|
38256
38257
|
case 13:
|
|
38257
38258
|
case "end":
|
|
@@ -39136,73 +39137,81 @@ function SubscriberFactory(_ref2) {
|
|
|
39136
39137
|
}
|
|
39137
39138
|
return _context19.abrupt("return");
|
|
39138
39139
|
case 2:
|
|
39140
|
+
onRemoteStreamAdded.remove(_ref30 => {
|
|
39141
|
+
let sourceStreamId = _ref30.data.sourceStreamId;
|
|
39142
|
+
return sourceStreamId === 'P2P';
|
|
39143
|
+
});
|
|
39139
39144
|
logRelayedToRoutedTransition('Attempt');
|
|
39145
|
+
if (!(_webRTCStream !== webRTCStreams.MANTIS)) {
|
|
39146
|
+
_context19.next = 21;
|
|
39147
|
+
break;
|
|
39148
|
+
}
|
|
39140
39149
|
_webRTCStream = webRTCStreams.MANTIS;
|
|
39141
39150
|
if (!(_videoEnabled && _videoMediaProcessorConnector)) {
|
|
39142
|
-
_context19.next =
|
|
39151
|
+
_context19.next = 9;
|
|
39143
39152
|
break;
|
|
39144
39153
|
}
|
|
39145
|
-
_context19.next =
|
|
39154
|
+
_context19.next = 9;
|
|
39146
39155
|
return _setVideoMediaProcessorConnector();
|
|
39147
|
-
case
|
|
39156
|
+
case 9:
|
|
39148
39157
|
if (!(_audioConnector.audioMediaProcessorConnector && _isSubscribingToAudio)) {
|
|
39149
|
-
_context19.next =
|
|
39158
|
+
_context19.next = 19;
|
|
39150
39159
|
break;
|
|
39151
39160
|
}
|
|
39152
|
-
_context19.prev =
|
|
39153
|
-
_context19.next =
|
|
39161
|
+
_context19.prev = 10;
|
|
39162
|
+
_context19.next = 13;
|
|
39154
39163
|
return _audioConnector.applyAudioConnectorOnRelayedToRoutedTransition();
|
|
39155
|
-
case
|
|
39164
|
+
case 13:
|
|
39156
39165
|
logAnalyticsEvent('setAudioMediaProcessorConnector', 'Success', {
|
|
39157
39166
|
message: 'Audio connector applied on relayed to routed transition.'
|
|
39158
39167
|
});
|
|
39159
|
-
_context19.next =
|
|
39168
|
+
_context19.next = 19;
|
|
39160
39169
|
break;
|
|
39161
|
-
case
|
|
39162
|
-
_context19.prev =
|
|
39163
|
-
_context19.t0 = _context19["catch"](
|
|
39170
|
+
case 16:
|
|
39171
|
+
_context19.prev = 16;
|
|
39172
|
+
_context19.t0 = _context19["catch"](10);
|
|
39164
39173
|
logAnalyticsEvent('setAudioMediaProcessorConnector', 'Failure', {
|
|
39165
39174
|
message: _context19.t0.message
|
|
39166
39175
|
});
|
|
39167
|
-
case 17:
|
|
39168
|
-
_context19.next = 19;
|
|
39169
|
-
return bindWebRTCStream(_webRTCStream);
|
|
39170
39176
|
case 19:
|
|
39171
39177
|
_context19.next = 21;
|
|
39172
|
-
return
|
|
39178
|
+
return bindWebRTCStream(_webRTCStream);
|
|
39173
39179
|
case 21:
|
|
39180
|
+
_context19.next = 23;
|
|
39181
|
+
return removePeerConnectionBySourceStreamId('P2P');
|
|
39182
|
+
case 23:
|
|
39174
39183
|
// Keep the loading spinner hidden so that the transition looks transparent.
|
|
39175
39184
|
_widgetView.loading(false);
|
|
39176
39185
|
_activeSourceStreamId = 'MANTIS';
|
|
39177
39186
|
|
|
39178
39187
|
// remove webRTCStream
|
|
39179
39188
|
removeWebRTCStream('P2P');
|
|
39180
|
-
_context19.next =
|
|
39189
|
+
_context19.next = 28;
|
|
39181
39190
|
return getCurrentPeerConnection();
|
|
39182
|
-
case
|
|
39191
|
+
case 28:
|
|
39183
39192
|
peerConnection = _context19.sent;
|
|
39184
|
-
_context19.next =
|
|
39193
|
+
_context19.next = 31;
|
|
39185
39194
|
return createAudioLevelSampler(peerConnection);
|
|
39186
|
-
case
|
|
39195
|
+
case 31:
|
|
39187
39196
|
_audioLevelSampler.webRTCStream(_webRTCStream);
|
|
39188
39197
|
logRelayedToRoutedTransition('Success');
|
|
39189
|
-
case
|
|
39198
|
+
case 33:
|
|
39190
39199
|
case "end":
|
|
39191
39200
|
return _context19.stop();
|
|
39192
39201
|
}
|
|
39193
|
-
}, _callee19, null, [[
|
|
39202
|
+
}, _callee19, null, [[10, 16]]);
|
|
39194
39203
|
}));
|
|
39195
39204
|
return function _transitionRelayedToRouted() {
|
|
39196
39205
|
return _ref29.apply(this, arguments);
|
|
39197
39206
|
};
|
|
39198
39207
|
}();
|
|
39199
|
-
this._destroy =
|
|
39208
|
+
this._destroy = _ref31 => {
|
|
39200
39209
|
var _session10, _session11, _session11$connection, _session$sessionInfo$2, _session12, _session12$sessionInf;
|
|
39201
|
-
let
|
|
39202
|
-
reason =
|
|
39203
|
-
quiet =
|
|
39204
|
-
|
|
39205
|
-
noStateTransition =
|
|
39210
|
+
let _ref31$reason = _ref31.reason,
|
|
39211
|
+
reason = _ref31$reason === void 0 ? 'Unknown' : _ref31$reason,
|
|
39212
|
+
quiet = _ref31.quiet,
|
|
39213
|
+
_ref31$noStateTransit = _ref31.noStateTransition,
|
|
39214
|
+
noStateTransition = _ref31$noStateTransit === void 0 ? false : _ref31$noStateTransit;
|
|
39206
39215
|
if (_state.isDestroyed()) {
|
|
39207
39216
|
return this;
|
|
39208
39217
|
}
|
|
@@ -39263,10 +39272,10 @@ function SubscriberFactory(_ref2) {
|
|
|
39263
39272
|
});
|
|
39264
39273
|
};
|
|
39265
39274
|
this._disconnect = function (_temp3) {
|
|
39266
|
-
let
|
|
39267
|
-
|
|
39268
|
-
reason =
|
|
39269
|
-
noStateTransition =
|
|
39275
|
+
let _ref32 = _temp3 === void 0 ? {} : _temp3,
|
|
39276
|
+
_ref32$reason = _ref32.reason,
|
|
39277
|
+
reason = _ref32$reason === void 0 ? 'Unknown' : _ref32$reason,
|
|
39278
|
+
noStateTransition = _ref32.noStateTransition;
|
|
39270
39279
|
// known reasons:
|
|
39271
39280
|
// forceUnpublished (publisher stream was destroyed by forceUnpublish)
|
|
39272
39281
|
// clientDisconnected (publisher unpublished)
|
|
@@ -39307,12 +39316,12 @@ function SubscriberFactory(_ref2) {
|
|
|
39307
39316
|
});
|
|
39308
39317
|
};
|
|
39309
39318
|
const processOffer = /*#__PURE__*/function () {
|
|
39310
|
-
var
|
|
39319
|
+
var _ref34 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20(_ref33) {
|
|
39311
39320
|
var peerId, fromConnectionId, sourceStreamId, uri, send, log, logQoS;
|
|
39312
39321
|
return _regenerator.default.wrap(function _callee20$(_context20) {
|
|
39313
39322
|
while (1) switch (_context20.prev = _context20.next) {
|
|
39314
39323
|
case 0:
|
|
39315
|
-
peerId =
|
|
39324
|
+
peerId = _ref33.peerId, fromConnectionId = _ref33.fromConnectionId, sourceStreamId = _ref33.sourceStreamId;
|
|
39316
39325
|
uri = constructSubscriberUri({
|
|
39317
39326
|
apiKey: _session.apiKey,
|
|
39318
39327
|
sessionId: _session.sessionId,
|
|
@@ -39361,7 +39370,7 @@ function SubscriberFactory(_ref2) {
|
|
|
39361
39370
|
}, _callee20);
|
|
39362
39371
|
}));
|
|
39363
39372
|
return function processOffer(_x17) {
|
|
39364
|
-
return
|
|
39373
|
+
return _ref34.apply(this, arguments);
|
|
39365
39374
|
};
|
|
39366
39375
|
}();
|
|
39367
39376
|
|
|
@@ -39369,7 +39378,7 @@ function SubscriberFactory(_ref2) {
|
|
|
39369
39378
|
// we don't need to create a new one, just accept the new offer.
|
|
39370
39379
|
const isRoutedToRelayedTransitionDuringMigration = (type, sourceStreamId) => _isAdaptiveEnabled && sourceStreamId === 'P2P' && type === 'offer' && _state.isMigrating();
|
|
39371
39380
|
this.processMessage = /*#__PURE__*/function () {
|
|
39372
|
-
var
|
|
39381
|
+
var _ref35 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21(type, fromConnectionId, message) {
|
|
39373
39382
|
var peerId, sourceStreamId, peerConnection, relayedStream;
|
|
39374
39383
|
return _regenerator.default.wrap(function _callee21$(_context21) {
|
|
39375
39384
|
while (1) switch (_context21.prev = _context21.next) {
|
|
@@ -39424,7 +39433,7 @@ function SubscriberFactory(_ref2) {
|
|
|
39424
39433
|
}, _callee21);
|
|
39425
39434
|
}));
|
|
39426
39435
|
return function (_x18, _x19, _x20) {
|
|
39427
|
-
return
|
|
39436
|
+
return _ref35.apply(this, arguments);
|
|
39428
39437
|
};
|
|
39429
39438
|
}();
|
|
39430
39439
|
this.disableVideo = active => {
|
|
@@ -39770,7 +39779,7 @@ function SubscriberFactory(_ref2) {
|
|
|
39770
39779
|
this.subscribeToAudio = pValue => {
|
|
39771
39780
|
const value = (0, _castToBoolean.default)(pValue, true);
|
|
39772
39781
|
getAllPeerConnections().forEach( /*#__PURE__*/function () {
|
|
39773
|
-
var
|
|
39782
|
+
var _ref36 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22(peerConnection) {
|
|
39774
39783
|
return _regenerator.default.wrap(function _callee22$(_context22) {
|
|
39775
39784
|
while (1) switch (_context22.prev = _context22.next) {
|
|
39776
39785
|
case 0:
|
|
@@ -39785,7 +39794,7 @@ function SubscriberFactory(_ref2) {
|
|
|
39785
39794
|
}, _callee22);
|
|
39786
39795
|
}));
|
|
39787
39796
|
return function (_x21) {
|
|
39788
|
-
return
|
|
39797
|
+
return _ref36.apply(this, arguments);
|
|
39789
39798
|
};
|
|
39790
39799
|
}());
|
|
39791
39800
|
if (_stream && getAllPeerConnections().length !== 0) {
|
|
@@ -40198,12 +40207,12 @@ function SubscriberFactory(_ref2) {
|
|
|
40198
40207
|
}
|
|
40199
40208
|
};
|
|
40200
40209
|
this._setupPeerConnection = /*#__PURE__*/function () {
|
|
40201
|
-
var
|
|
40210
|
+
var _ref38 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23(_ref37) {
|
|
40202
40211
|
var send, log, logQoS, sourceStreamId;
|
|
40203
40212
|
return _regenerator.default.wrap(function _callee23$(_context23) {
|
|
40204
40213
|
while (1) switch (_context23.prev = _context23.next) {
|
|
40205
40214
|
case 0:
|
|
40206
|
-
send =
|
|
40215
|
+
send = _ref37.send, log = _ref37.log, logQoS = _ref37.logQoS, sourceStreamId = _ref37.sourceStreamId;
|
|
40207
40216
|
if (_properties.testNetwork) {
|
|
40208
40217
|
_this.setAudioVolume(0);
|
|
40209
40218
|
}
|
|
@@ -40262,7 +40271,7 @@ function SubscriberFactory(_ref2) {
|
|
|
40262
40271
|
}, _callee23);
|
|
40263
40272
|
}));
|
|
40264
40273
|
return function (_x22) {
|
|
40265
|
-
return
|
|
40274
|
+
return _ref38.apply(this, arguments);
|
|
40266
40275
|
};
|
|
40267
40276
|
}();
|
|
40268
40277
|
|
|
@@ -40392,7 +40401,7 @@ function SubscriberFactory(_ref2) {
|
|
|
40392
40401
|
while (1) switch (_context27.prev = _context27.next) {
|
|
40393
40402
|
case 0:
|
|
40394
40403
|
getAllPeerConnections().forEach( /*#__PURE__*/function () {
|
|
40395
|
-
var
|
|
40404
|
+
var _ref39 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26(pc) {
|
|
40396
40405
|
return _regenerator.default.wrap(function _callee26$(_context26) {
|
|
40397
40406
|
while (1) switch (_context26.prev = _context26.next) {
|
|
40398
40407
|
case 0:
|
|
@@ -40407,7 +40416,7 @@ function SubscriberFactory(_ref2) {
|
|
|
40407
40416
|
}, _callee26);
|
|
40408
40417
|
}));
|
|
40409
40418
|
return function (_x24) {
|
|
40410
|
-
return
|
|
40419
|
+
return _ref39.apply(this, arguments);
|
|
40411
40420
|
};
|
|
40412
40421
|
}());
|
|
40413
40422
|
case 1:
|
|
@@ -40638,7 +40647,7 @@ function SubscriberFactory(_ref2) {
|
|
|
40638
40647
|
* @memberOf Subscriber
|
|
40639
40648
|
*/
|
|
40640
40649
|
this.subscribeToCaptions = /*#__PURE__*/function () {
|
|
40641
|
-
var
|
|
40650
|
+
var _ref40 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29(value) {
|
|
40642
40651
|
var active, attributes;
|
|
40643
40652
|
return _regenerator.default.wrap(function _callee29$(_context29) {
|
|
40644
40653
|
while (1) switch (_context29.prev = _context29.next) {
|
|
@@ -40662,7 +40671,7 @@ function SubscriberFactory(_ref2) {
|
|
|
40662
40671
|
}, _callee29);
|
|
40663
40672
|
}));
|
|
40664
40673
|
return function (_x25) {
|
|
40665
|
-
return
|
|
40674
|
+
return _ref40.apply(this, arguments);
|
|
40666
40675
|
};
|
|
40667
40676
|
}();
|
|
40668
40677
|
|
|
@@ -40818,7 +40827,7 @@ function SubscriberFactory(_ref2) {
|
|
|
40818
40827
|
* If there is an error, the promise is rejected and no connector is set.
|
|
40819
40828
|
*/
|
|
40820
40829
|
this.setVideoMediaProcessorConnector = /*#__PURE__*/function () {
|
|
40821
|
-
var
|
|
40830
|
+
var _ref41 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30(mediaProcessorConnector) {
|
|
40822
40831
|
var isTransitioning;
|
|
40823
40832
|
return _regenerator.default.wrap(function _callee30$(_context30) {
|
|
40824
40833
|
while (1) switch (_context30.prev = _context30.next) {
|
|
@@ -40881,11 +40890,11 @@ function SubscriberFactory(_ref2) {
|
|
|
40881
40890
|
}, _callee30, null, [[15, 20]]);
|
|
40882
40891
|
}));
|
|
40883
40892
|
return function (_x26) {
|
|
40884
|
-
return
|
|
40893
|
+
return _ref41.apply(this, arguments);
|
|
40885
40894
|
};
|
|
40886
40895
|
}();
|
|
40887
40896
|
const _setVideoMediaProcessorConnector = /*#__PURE__*/function () {
|
|
40888
|
-
var
|
|
40897
|
+
var _ref42 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31() {
|
|
40889
40898
|
var _webRTCStream$getVide, message, filteredVideoTrack;
|
|
40890
40899
|
return _regenerator.default.wrap(function _callee31$(_context31) {
|
|
40891
40900
|
while (1) switch (_context31.prev = _context31.next) {
|
|
@@ -40927,7 +40936,7 @@ function SubscriberFactory(_ref2) {
|
|
|
40927
40936
|
}, _callee31, null, [[7, 15]]);
|
|
40928
40937
|
}));
|
|
40929
40938
|
return function _setVideoMediaProcessorConnector() {
|
|
40930
|
-
return
|
|
40939
|
+
return _ref42.apply(this, arguments);
|
|
40931
40940
|
};
|
|
40932
40941
|
}();
|
|
40933
40942
|
const _resetVideoStream = () => {
|
|
@@ -41003,7 +41012,7 @@ function SubscriberFactory(_ref2) {
|
|
|
41003
41012
|
* If there is an error, the promise is rejected and no connector is set.
|
|
41004
41013
|
*/
|
|
41005
41014
|
this.setAudioMediaProcessorConnector = /*#__PURE__*/function () {
|
|
41006
|
-
var
|
|
41015
|
+
var _ref43 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32(mediaProcessorConnector) {
|
|
41007
41016
|
var message, isTransitioning;
|
|
41008
41017
|
return _regenerator.default.wrap(function _callee32$(_context32) {
|
|
41009
41018
|
while (1) switch (_context32.prev = _context32.next) {
|
|
@@ -41056,11 +41065,11 @@ function SubscriberFactory(_ref2) {
|
|
|
41056
41065
|
}, _callee32);
|
|
41057
41066
|
}));
|
|
41058
41067
|
return function (_x27) {
|
|
41059
|
-
return
|
|
41068
|
+
return _ref43.apply(this, arguments);
|
|
41060
41069
|
};
|
|
41061
41070
|
}();
|
|
41062
41071
|
const _setAudioMediaProcessorConnector = /*#__PURE__*/function () {
|
|
41063
|
-
var
|
|
41072
|
+
var _ref44 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33() {
|
|
41064
41073
|
return _regenerator.default.wrap(function _callee33$(_context33) {
|
|
41065
41074
|
while (1) switch (_context33.prev = _context33.next) {
|
|
41066
41075
|
case 0:
|
|
@@ -41087,7 +41096,7 @@ function SubscriberFactory(_ref2) {
|
|
|
41087
41096
|
}, _callee33, null, [[0, 5]]);
|
|
41088
41097
|
}));
|
|
41089
41098
|
return function _setAudioMediaProcessorConnector() {
|
|
41090
|
-
return
|
|
41099
|
+
return _ref44.apply(this, arguments);
|
|
41091
41100
|
};
|
|
41092
41101
|
}();
|
|
41093
41102
|
|