@opentok/client 2.30.1-alpha.2 → 2.30.1-alpha.3
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 +28 -23
- package/dist/js/opentok.js.map +1 -1
- package/dist/js/opentok.min.js +5 -5
- 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.30.1
|
|
2
|
+
* @license OpenTok.js 2.30.1 72c06c3d2
|
|
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: Wed, 21 May 2025 16:17:04 GMT
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -8672,7 +8672,7 @@ const logging = (0, _log.default)('StaticConfig');
|
|
|
8672
8672
|
*/
|
|
8673
8673
|
|
|
8674
8674
|
/** @type builtInConfig */
|
|
8675
|
-
const builtInConfig = (0, _cloneDeep.default)({"version":"v2.30.1","buildHash":"
|
|
8675
|
+
const builtInConfig = (0, _cloneDeep.default)({"version":"v2.30.1","buildHash":"72c06c3d2","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"});
|
|
8676
8676
|
const whitelistAllowedRuntimeProperties = (0, _pick.default)(['apiURL', 'assetURL', 'cdnURL', 'sessionInfoOverrides', 'loggingURL']);
|
|
8677
8677
|
const liveConfigMap = {
|
|
8678
8678
|
apiUrl: 'apiURL',
|
|
@@ -17776,8 +17776,9 @@ function PublisherFactory(_ref) {
|
|
|
17776
17776
|
});
|
|
17777
17777
|
});
|
|
17778
17778
|
function getCommonAnalyticsFields() {
|
|
17779
|
+
var _getSession, _getSession2, _getSession2$connecti;
|
|
17779
17780
|
return {
|
|
17780
|
-
connectionId: getSession().isConnected() ? getSession().connection.connectionId : null,
|
|
17781
|
+
connectionId: (_getSession = getSession()) != null && _getSession.isConnected() ? (_getSession2 = getSession()) == null ? void 0 : (_getSession2$connecti = _getSession2.connection) == null ? void 0 : _getSession2$connecti.connectionId : null,
|
|
17781
17782
|
streamId: getStreamId(),
|
|
17782
17783
|
widgetType: 'Publisher'
|
|
17783
17784
|
};
|
|
@@ -18079,7 +18080,7 @@ function PublisherFactory(_ref) {
|
|
|
18079
18080
|
logAnalyticsEvent('GetRtcStatsReport', 'Called');
|
|
18080
18081
|
});
|
|
18081
18082
|
const recordQOS = _ref4 => {
|
|
18082
|
-
var _properties$audioFall;
|
|
18083
|
+
var _this$session2, _this$session3, _this$session3$connec, _properties$audioFall;
|
|
18083
18084
|
let parsedStats = _ref4.parsedStats,
|
|
18084
18085
|
simulcastEnabled = _ref4.simulcastEnabled,
|
|
18085
18086
|
remoteConnectionId = _ref4.remoteConnectionId,
|
|
@@ -18088,7 +18089,7 @@ function PublisherFactory(_ref) {
|
|
|
18088
18089
|
const QoSBlob = {
|
|
18089
18090
|
peerId,
|
|
18090
18091
|
widgetType: 'Publisher',
|
|
18091
|
-
connectionId: this.session &&
|
|
18092
|
+
connectionId: (_this$session2 = this.session) != null && _this$session2.isConnected() ? (_this$session3 = this.session) == null ? void 0 : (_this$session3$connec = _this$session3.connection) == null ? void 0 : _this$session3$connec.connectionId : null,
|
|
18092
18093
|
streamId: this.streamId,
|
|
18093
18094
|
width: widgetView.width,
|
|
18094
18095
|
height: widgetView.height,
|
|
@@ -20892,7 +20893,7 @@ function PublisherFactory(_ref) {
|
|
|
20892
20893
|
document.addEventListener('visibilitychange', visibilityHandler);
|
|
20893
20894
|
};
|
|
20894
20895
|
const handleBuggedUnMutedLocalAudioTrack = audioTrack => {
|
|
20895
|
-
var _this$
|
|
20896
|
+
var _this$session4;
|
|
20896
20897
|
if (hasAudio()) {
|
|
20897
20898
|
if (!hasVideo()) {
|
|
20898
20899
|
// We only need to reset the audio source when the publisher is audio only.
|
|
@@ -20907,7 +20908,7 @@ function PublisherFactory(_ref) {
|
|
|
20907
20908
|
this.videoElement().pause();
|
|
20908
20909
|
}
|
|
20909
20910
|
}
|
|
20910
|
-
this == null ? void 0 : (_this$
|
|
20911
|
+
this == null ? void 0 : (_this$session4 = this.session) == null ? void 0 : _this$session4.trigger('gsmCallEnded');
|
|
20911
20912
|
};
|
|
20912
20913
|
|
|
20913
20914
|
/**
|
|
@@ -37157,18 +37158,18 @@ function SubscriberFactory(_ref2) {
|
|
|
37157
37158
|
return _webRTCStream.getAudioTracks().length > 0;
|
|
37158
37159
|
};
|
|
37159
37160
|
const logAnalyticsEvent = (action, variation, payload, options, throttle) => {
|
|
37160
|
-
var _session2;
|
|
37161
|
+
var _session2, _session3, _session3$connection, _session$sessionInfo$, _session4, _session4$sessionInfo, _session5;
|
|
37161
37162
|
let stats = (0, _assign.default)({
|
|
37162
37163
|
action,
|
|
37163
37164
|
variation,
|
|
37164
37165
|
payload,
|
|
37165
37166
|
streamId: _stream ? _stream.id : null,
|
|
37166
37167
|
sessionId: _session ? _session.sessionId : null,
|
|
37167
|
-
connectionId: _session &&
|
|
37168
|
-
partnerId: _session
|
|
37168
|
+
connectionId: (_session2 = _session) != null && _session2.isConnected() ? (_session3 = _session) == null ? void 0 : (_session3$connection = _session3.connection) == null ? void 0 : _session3$connection.connectionId : null,
|
|
37169
|
+
partnerId: (_session$sessionInfo$ = (_session4 = _session) == null ? void 0 : (_session4$sessionInfo = _session4.sessionInfo) == null ? void 0 : _session4$sessionInfo.partnerId) != null ? _session$sessionInfo$ : null,
|
|
37169
37170
|
subscriberId: _widgetId,
|
|
37170
37171
|
widgetType: 'Subscriber',
|
|
37171
|
-
singlePeerConnection: !!((
|
|
37172
|
+
singlePeerConnection: !!((_session5 = _session) != null && _session5._singlePeerConnectionController)
|
|
37172
37173
|
}, options);
|
|
37173
37174
|
if (variation === 'Failure' || variation === 'iceconnectionstatechange' && payload === 'closed') {
|
|
37174
37175
|
stats = (0, _assign.default)(stats, _preDisconnectStats);
|
|
@@ -37340,8 +37341,9 @@ function SubscriberFactory(_ref2) {
|
|
|
37340
37341
|
(0, _connectivityAttemptPinger.default)({
|
|
37341
37342
|
connectivityState,
|
|
37342
37343
|
logAttempt() {
|
|
37344
|
+
var _session6, _session7, _session7$connection;
|
|
37343
37345
|
logAnalyticsEvent('Subscribe', 'Attempting', null, {
|
|
37344
|
-
connectionId: _session &&
|
|
37346
|
+
connectionId: (_session6 = _session) != null && _session6.isConnected() ? (_session7 = _session) == null ? void 0 : (_session7$connection = _session7.connection) == null ? void 0 : _session7$connection.connectionId : null
|
|
37345
37347
|
});
|
|
37346
37348
|
}
|
|
37347
37349
|
});
|
|
@@ -37366,7 +37368,7 @@ function SubscriberFactory(_ref2) {
|
|
|
37366
37368
|
logAnalyticsEvent('ICERestart', variation, payload);
|
|
37367
37369
|
};
|
|
37368
37370
|
const recordQOS = _ref12 => {
|
|
37369
|
-
var _properties$preferred, _properties$preferred2;
|
|
37371
|
+
var _session$connection$c, _session8, _session8$connection, _properties$preferred, _properties$preferred2;
|
|
37370
37372
|
let parsedStats = _ref12.parsedStats,
|
|
37371
37373
|
remoteConnectionId = _ref12.remoteConnectionId,
|
|
37372
37374
|
peerId = _ref12.peerId,
|
|
@@ -37380,7 +37382,7 @@ function SubscriberFactory(_ref2) {
|
|
|
37380
37382
|
subscribeToAudio: _isSubscribingToAudio,
|
|
37381
37383
|
audioVolume: this.getAudioVolume(),
|
|
37382
37384
|
videoTrack: _streamHasTracks('video'),
|
|
37383
|
-
connectionId: _session ?
|
|
37385
|
+
connectionId: (_session$connection$c = (_session8 = _session) == null ? void 0 : (_session8$connection = _session8.connection) == null ? void 0 : _session8$connection.connectionId) != null ? _session$connection$c : null,
|
|
37384
37386
|
hasVideo: _stream && _stream.hasVideo,
|
|
37385
37387
|
subscribeToVideo: _properties.subscribeToVideo,
|
|
37386
37388
|
congestionLevel: _congestionLevel,
|
|
@@ -37904,13 +37906,13 @@ function SubscriberFactory(_ref2) {
|
|
|
37904
37906
|
}();
|
|
37905
37907
|
const onRemoteStreamAdded = (0, _queue.default)( /*#__PURE__*/function () {
|
|
37906
37908
|
var _ref21 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(_ref20, done) {
|
|
37907
|
-
var webRTCStream, peerConnection, sourceStreamId,
|
|
37909
|
+
var webRTCStream, peerConnection, sourceStreamId, _session9, sessionInfo, forceDisable;
|
|
37908
37910
|
return _regenerator.default.wrap(function _callee11$(_context11) {
|
|
37909
37911
|
while (1) switch (_context11.prev = _context11.next) {
|
|
37910
37912
|
case 0:
|
|
37911
37913
|
webRTCStream = _ref20.webRTCStream, peerConnection = _ref20.peerConnection;
|
|
37912
37914
|
sourceStreamId = peerConnection == null ? void 0 : peerConnection.getSourceStreamId();
|
|
37913
|
-
|
|
37915
|
+
_session9 = _session, sessionInfo = _session9.sessionInfo;
|
|
37914
37916
|
setStream(webRTCStream, sourceStreamId);
|
|
37915
37917
|
logging.debug('OT.Subscriber.onRemoteStreamAdded with sourceStreamId', sourceStreamId);
|
|
37916
37918
|
if (!_state.isMigrating()) {
|
|
@@ -38619,6 +38621,7 @@ function SubscriberFactory(_ref2) {
|
|
|
38619
38621
|
};
|
|
38620
38622
|
}();
|
|
38621
38623
|
this._destroy = _ref30 => {
|
|
38624
|
+
var _session10, _session11, _session11$connection, _session$sessionInfo$2, _session12, _session12$sessionInf;
|
|
38622
38625
|
let _ref30$reason = _ref30.reason,
|
|
38623
38626
|
reason = _ref30$reason === void 0 ? 'Unknown' : _ref30$reason,
|
|
38624
38627
|
quiet = _ref30.quiet,
|
|
@@ -38634,8 +38637,8 @@ function SubscriberFactory(_ref2) {
|
|
|
38634
38637
|
}
|
|
38635
38638
|
_preDisconnectStats = {
|
|
38636
38639
|
sessionId: _session.sessionId,
|
|
38637
|
-
connectionId: _session &&
|
|
38638
|
-
partnerId: _session
|
|
38640
|
+
connectionId: (_session10 = _session) != null && _session10.isConnected() ? (_session11 = _session) == null ? void 0 : (_session11$connection = _session11.connection) == null ? void 0 : _session11$connection.connectionId : null,
|
|
38641
|
+
partnerId: (_session$sessionInfo$2 = (_session12 = _session) == null ? void 0 : (_session12$sessionInf = _session12.sessionInfo) == null ? void 0 : _session12$sessionInf.partnerId) != null ? _session$sessionInfo$2 : null,
|
|
38639
38642
|
streamId: _stream && !_stream.destroyed ? _stream.id : null
|
|
38640
38643
|
};
|
|
38641
38644
|
this._disconnect({
|
|
@@ -39631,7 +39634,7 @@ function SubscriberFactory(_ref2) {
|
|
|
39631
39634
|
_activeSourceStreamId = sourceStreamId;
|
|
39632
39635
|
peerConnectionsAsync[sourceStreamId] = new Promise((resolve, reject) => {
|
|
39633
39636
|
_session._.getIceConfig().then(iceConfig => {
|
|
39634
|
-
var
|
|
39637
|
+
var _session13;
|
|
39635
39638
|
if (iceConfig.needRumorIceServersFallback) {
|
|
39636
39639
|
iceConfig.servers = [...(fallbackIceServers || []), ...(iceConfig.servers || [])];
|
|
39637
39640
|
}
|
|
@@ -39648,7 +39651,7 @@ function SubscriberFactory(_ref2) {
|
|
|
39648
39651
|
keyStore: _session.keyStore,
|
|
39649
39652
|
sFrameClientStore: _session.sFrameClientStore,
|
|
39650
39653
|
isE2ee: _session._.isE2ee(),
|
|
39651
|
-
sessionId: (
|
|
39654
|
+
sessionId: (_session13 = _session) == null ? void 0 : _session13.sessionId
|
|
39652
39655
|
};
|
|
39653
39656
|
if (Object.prototype.hasOwnProperty.call(_properties, 'codecFlags')) {
|
|
39654
39657
|
props.codecFlags = _properties.codecFlags;
|
|
@@ -44809,6 +44812,7 @@ function SessionFactory(deps) {
|
|
|
44809
44812
|
* @memberOf Session
|
|
44810
44813
|
*/
|
|
44811
44814
|
this.subscribe = function (stream, targetElement, properties, completionHandler) {
|
|
44815
|
+
var _this$connection;
|
|
44812
44816
|
if (typeof targetElement === 'function') {
|
|
44813
44817
|
completionHandler = targetElement;
|
|
44814
44818
|
targetElement = undefined;
|
|
@@ -44819,7 +44823,7 @@ function SessionFactory(deps) {
|
|
|
44819
44823
|
properties = undefined;
|
|
44820
44824
|
}
|
|
44821
44825
|
completionHandler = completionHandler || function () {};
|
|
44822
|
-
if (!
|
|
44826
|
+
if (!((_this$connection = this.connection) != null && _this$connection.connectionId)) {
|
|
44823
44827
|
dispatchOTError(otError(errors.NOT_CONNECTED, new Error('Session.subscribe :: Connection required to subscribe'), ExceptionCodes.UNABLE_TO_SUBSCRIBE), completionHandler);
|
|
44824
44828
|
return undefined;
|
|
44825
44829
|
}
|
|
@@ -45017,12 +45021,13 @@ function SessionFactory(deps) {
|
|
|
45017
45021
|
_isSocketReconnecting = false;
|
|
45018
45022
|
this.dispatchEvent(new Events.SessionReconnectedEvent());
|
|
45019
45023
|
if (this.sessionInfo.reconnection) {
|
|
45024
|
+
var _this$session, _this$session$session;
|
|
45020
45025
|
sessionObjects.publishers.where({
|
|
45021
45026
|
session: this
|
|
45022
45027
|
}).forEach(publisher => {
|
|
45023
45028
|
publisher._.iceRestart();
|
|
45024
45029
|
});
|
|
45025
|
-
if (!this.session.sessionInfo.p2pEnabled) {
|
|
45030
|
+
if (!((_this$session = this.session) != null && (_this$session$session = _this$session.sessionInfo) != null && _this$session$session.p2pEnabled)) {
|
|
45026
45031
|
sessionObjects.subscribers.where({
|
|
45027
45032
|
session: this
|
|
45028
45033
|
}).forEach(subscriber => {
|