@opentok/client 2.31.0-alpha.1 → 2.31.0-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 +35 -43
- 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.31.0
|
|
2
|
+
* @license OpenTok.js 2.31.0 f2c89a9ea
|
|
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: Wed,
|
|
8
|
+
* Date: Wed, 16 Jul 2025 15:30:28 GMT
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -8679,7 +8679,7 @@ const logging = (0, _log.default)('StaticConfig');
|
|
|
8679
8679
|
*/
|
|
8680
8680
|
|
|
8681
8681
|
/** @type builtInConfig */
|
|
8682
|
-
const builtInConfig = (0, _cloneDeep.default)({"version":"v2.31.0","buildHash":"
|
|
8682
|
+
const builtInConfig = (0, _cloneDeep.default)({"version":"v2.31.0","buildHash":"f2c89a9ea","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"});
|
|
8683
8683
|
const whitelistAllowedRuntimeProperties = (0, _pick.default)(['apiURL', 'assetURL', 'cdnURL', 'sessionInfoOverrides', 'loggingURL']);
|
|
8684
8684
|
const liveConfigMap = {
|
|
8685
8685
|
apiUrl: 'apiURL',
|
|
@@ -16859,7 +16859,7 @@ function WidgetViewFactory(_temp) {
|
|
|
16859
16859
|
_context.prev = 15;
|
|
16860
16860
|
_context.t0 = _context["catch"](5);
|
|
16861
16861
|
// We are not interested in the error.
|
|
16862
|
-
if (env.isChromium) {
|
|
16862
|
+
if (env.isChromium && stream.getVideoTracks().length) {
|
|
16863
16863
|
// For Chromium browsers, we need to enable the video track before playing it to ensure we
|
|
16864
16864
|
// do not see a black screen during an AMR transition. See VIDCS-3570 for more details.
|
|
16865
16865
|
// eslint-disable-next-line no-param-reassign
|
|
@@ -17106,36 +17106,27 @@ function WidgetViewFactory(_temp) {
|
|
|
17106
17106
|
});
|
|
17107
17107
|
hasExistingElement = !!this._videoElementFacade;
|
|
17108
17108
|
cancellation = this._getNewBindCancellation();
|
|
17109
|
-
if (hasExistingElement) {
|
|
17110
|
-
|
|
17111
|
-
|
|
17112
|
-
|
|
17113
|
-
|
|
17114
|
-
|
|
17115
|
-
|
|
17116
|
-
|
|
17117
|
-
|
|
17118
|
-
|
|
17119
|
-
this._videoFacadeEvents.on('mediaElementEvent', action => {
|
|
17120
|
-
this.trigger('mediaElementEvent', action);
|
|
17121
|
-
});
|
|
17122
|
-
_context5.next = 14;
|
|
17123
|
-
break;
|
|
17124
|
-
case 10:
|
|
17125
|
-
if (!(webRTCStream instanceof MediaStream)) {
|
|
17126
|
-
_context5.next = 14;
|
|
17127
|
-
break;
|
|
17109
|
+
if (!hasExistingElement) {
|
|
17110
|
+
this._createVideoElementFacade({
|
|
17111
|
+
_inject,
|
|
17112
|
+
audioVolume,
|
|
17113
|
+
fallbackText,
|
|
17114
|
+
muted
|
|
17115
|
+
});
|
|
17116
|
+
this._videoFacadeEvents.on('mediaElementEvent', action => {
|
|
17117
|
+
this.trigger('mediaElementEvent', action);
|
|
17118
|
+
});
|
|
17128
17119
|
}
|
|
17129
|
-
if (!hasVideo) {
|
|
17130
|
-
_context5.next =
|
|
17120
|
+
if (!(webRTCStream instanceof MediaStream && hasVideo && isSubscribingToVideo)) {
|
|
17121
|
+
_context5.next = 9;
|
|
17131
17122
|
break;
|
|
17132
17123
|
}
|
|
17133
|
-
_context5.next =
|
|
17124
|
+
_context5.next = 9;
|
|
17134
17125
|
return this._tryToLoadVideoBuffer(webRTCStream, cancellation, throwIfBufferFails, hasVideo && isSubscribingToVideo);
|
|
17135
|
-
case
|
|
17136
|
-
_context5.next =
|
|
17126
|
+
case 9:
|
|
17127
|
+
_context5.next = 11;
|
|
17137
17128
|
return this._bindToStream(webRTCStream, cancellation);
|
|
17138
|
-
case
|
|
17129
|
+
case 11:
|
|
17139
17130
|
if (!hasExistingElement) {
|
|
17140
17131
|
this._triggerVideoElementCreated();
|
|
17141
17132
|
}
|
|
@@ -17144,16 +17135,16 @@ function WidgetViewFactory(_temp) {
|
|
|
17144
17135
|
defaultVideoElementFacade: this._videoElementFacade,
|
|
17145
17136
|
maxWaitTime: 5000
|
|
17146
17137
|
});
|
|
17147
|
-
_context5.next =
|
|
17138
|
+
_context5.next = 16;
|
|
17148
17139
|
return this._waitForVideoResolution(webRTCStream);
|
|
17149
|
-
case
|
|
17140
|
+
case 16:
|
|
17150
17141
|
logging.debug('Waiting for video to be playing');
|
|
17151
|
-
_context5.next =
|
|
17142
|
+
_context5.next = 19;
|
|
17152
17143
|
return whenVideoPlaying;
|
|
17153
|
-
case
|
|
17144
|
+
case 19:
|
|
17154
17145
|
logging.debug('Video is playing');
|
|
17155
17146
|
throwIfBindCancelled(cancellation);
|
|
17156
|
-
case
|
|
17147
|
+
case 21:
|
|
17157
17148
|
case "end":
|
|
17158
17149
|
return _context5.stop();
|
|
17159
17150
|
}
|
|
@@ -37617,24 +37608,25 @@ function SubscriberFactory(_ref2) {
|
|
|
37617
37608
|
_context3.next = 9;
|
|
37618
37609
|
return _widgetView.bindVideo(webRTCStream, videoContainerOptions, throwIfBufferFails);
|
|
37619
37610
|
case 9:
|
|
37620
|
-
|
|
37611
|
+
_widgetView.loading(false);
|
|
37612
|
+
_context3.next = 18;
|
|
37621
37613
|
break;
|
|
37622
|
-
case
|
|
37623
|
-
_context3.prev =
|
|
37614
|
+
case 12:
|
|
37615
|
+
_context3.prev = 12;
|
|
37624
37616
|
_context3.t0 = _context3["catch"](6);
|
|
37625
37617
|
if (!(_context3.t0 instanceof _cancel.CancellationError || _state.isDestroyed())) {
|
|
37626
|
-
_context3.next =
|
|
37618
|
+
_context3.next = 16;
|
|
37627
37619
|
break;
|
|
37628
37620
|
}
|
|
37629
37621
|
return _context3.abrupt("return");
|
|
37630
|
-
case
|
|
37622
|
+
case 16:
|
|
37631
37623
|
onVideoError(_context3.t0);
|
|
37632
37624
|
throw _context3.t0;
|
|
37633
|
-
case
|
|
37625
|
+
case 18:
|
|
37634
37626
|
case "end":
|
|
37635
37627
|
return _context3.stop();
|
|
37636
37628
|
}
|
|
37637
|
-
}, _callee3, null, [[6,
|
|
37629
|
+
}, _callee3, null, [[6, 12]]);
|
|
37638
37630
|
}));
|
|
37639
37631
|
return function bindWebRTCStream(_x3) {
|
|
37640
37632
|
return _ref6.apply(this, arguments);
|
|
@@ -37972,7 +37964,6 @@ function SubscriberFactory(_ref2) {
|
|
|
37972
37964
|
logging.debug('OT.Subscriber.onLoaded');
|
|
37973
37965
|
_state.set('Subscribing');
|
|
37974
37966
|
_subscribeStartTime = (0, _now.default)();
|
|
37975
|
-
_widgetView.loading(false);
|
|
37976
37967
|
if (_chrome) {
|
|
37977
37968
|
_chrome.showAfterLoading();
|
|
37978
37969
|
}
|
|
@@ -38662,7 +38653,8 @@ function SubscriberFactory(_ref2) {
|
|
|
38662
38653
|
}
|
|
38663
38654
|
};
|
|
38664
38655
|
const updateWidgetView = currentConnectionState => {
|
|
38665
|
-
|
|
38656
|
+
// We check that the subscriber has loaded so we do not prematurely hide the loading spinner and show a flickering video.
|
|
38657
|
+
if (_widgetView && _loaded) {
|
|
38666
38658
|
_widgetView.loading(currentConnectionState !== _eventNames.default.SUBSCRIBER_CONNECTED);
|
|
38667
38659
|
}
|
|
38668
38660
|
};
|