@opentok/client 2.30.0-alpha.11 → 2.30.0-alpha.13

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.
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license OpenTok.js 2.30.0 55a461a
2
+ * @license OpenTok.js 2.30.0 e359c8f
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: Thu, 24 Apr 2025 17:23:53 GMT
8
+ * Date: Fri, 25 Apr 2025 10:16:15 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.0","buildHash":"55a461a","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"});
8675
+ const builtInConfig = (0, _cloneDeep.default)({"version":"v2.30.0","buildHash":"e359c8f","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',
@@ -17167,10 +17167,6 @@ function WidgetViewFactory(_temp) {
17167
17167
  OTHelpers.css(this._posterContainer, 'backgroundImage', `url(${src})`);
17168
17168
  return this.poster();
17169
17169
  };
17170
- _proto.prepareForStreamTransition = function prepareForStreamTransition() {
17171
- var _this$_videoElementFa;
17172
- (_this$_videoElementFa = this._videoElementFacade) == null ? void 0 : _this$_videoElementFa.prepareForStreamTransition();
17173
- };
17174
17170
  _proto.loading = function loading(isLoading) {
17175
17171
  if (isLoading === undefined) {
17176
17172
  return this._loading;
@@ -25331,11 +25327,7 @@ function NativeVideoElementWrapperFactory(deps) {
25331
25327
  _proto.aspectRatio = function aspectRatio() {
25332
25328
  return this.videoWidth() / this.videoHeight();
25333
25329
  };
25334
- _proto.prepareForStreamTransition = function prepareForStreamTransition() {
25335
- const streamImage = this._getStreamImage();
25336
- this._domElement.poster = streamImage;
25337
- };
25338
- _proto._getStreamImage = function _getStreamImage() {
25330
+ _proto.imgData = function imgData() {
25339
25331
  const canvas = OTHelpers.createElement('canvas', {
25340
25332
  width: this.videoWidth(),
25341
25333
  height: this.videoHeight(),
@@ -25358,10 +25350,7 @@ function NativeVideoElementWrapperFactory(deps) {
25358
25350
  this.logging.warn('Cannot get image data yet');
25359
25351
  return null;
25360
25352
  }
25361
- return imgData;
25362
- };
25363
- _proto.imgData = function imgData() {
25364
- return this._getStreamImage().replace('data:image/png;base64,', '').trim();
25353
+ return imgData.replace('data:image/png;base64,', '').trim();
25365
25354
  }
25366
25355
  // Append the Video DOM element to a parent node
25367
25356
  ;
@@ -36916,7 +36905,6 @@ function SubscriberFactory(_ref2) {
36916
36905
  P2P: _eventNames.default.SUBSCRIBER_DISCONNECTED,
36917
36906
  MANTIS: _eventNames.default.SUBSCRIBER_DISCONNECTED
36918
36907
  };
36919
- let _subscriberConnectionState = _eventNames.default.SUBSCRIBER_DISCONNECTED;
36920
36908
  let _videoMediaProcessorConnector;
36921
36909
  let _originalVideoTrack;
36922
36910
  let _senderStats;
@@ -37032,31 +37020,29 @@ function SubscriberFactory(_ref2) {
37032
37020
  hasVideo: (_stream2 = _stream) == null ? void 0 : _stream2.hasVideo
37033
37021
  }; // We want to catch any error in the prebuffering when transition to P2P.
37034
37022
  // Otherwise, we ignore it.
37035
- throwIfBufferFails = _isAdaptiveEnabled && _activeSourceStreamId === 'P2P'; // To minimize the blip effect during a stream transition, we take a snapshot of the video stream (if available)
37036
- // and display it instead of a blank screen.
37037
- _widgetView.prepareForStreamTransition();
37038
- _context3.prev = 6;
37039
- _context3.next = 9;
37023
+ throwIfBufferFails = _isAdaptiveEnabled && _activeSourceStreamId === 'P2P';
37024
+ _context3.prev = 5;
37025
+ _context3.next = 8;
37040
37026
  return _widgetView.bindVideo(webRTCStream, videoContainerOptions, throwIfBufferFails);
37041
- case 9:
37042
- _context3.next = 17;
37027
+ case 8:
37028
+ _context3.next = 16;
37043
37029
  break;
37044
- case 11:
37045
- _context3.prev = 11;
37046
- _context3.t0 = _context3["catch"](6);
37030
+ case 10:
37031
+ _context3.prev = 10;
37032
+ _context3.t0 = _context3["catch"](5);
37047
37033
  if (!(_context3.t0 instanceof _cancel.CancellationError || _state.isDestroyed())) {
37048
- _context3.next = 15;
37034
+ _context3.next = 14;
37049
37035
  break;
37050
37036
  }
37051
37037
  return _context3.abrupt("return");
37052
- case 15:
37038
+ case 14:
37053
37039
  onVideoError(_context3.t0);
37054
37040
  throw _context3.t0;
37055
- case 17:
37041
+ case 16:
37056
37042
  case "end":
37057
37043
  return _context3.stop();
37058
37044
  }
37059
- }, _callee3, null, [[6, 11]]);
37045
+ }, _callee3, null, [[5, 10]]);
37060
37046
  }));
37061
37047
  return function bindWebRTCStream(_x3) {
37062
37048
  return _ref6.apply(this, arguments);
@@ -38083,7 +38069,7 @@ function SubscriberFactory(_ref2) {
38083
38069
  };
38084
38070
  const notifyStateChange = (state, currentConnectionState, sourceStreamId) => {
38085
38071
  logging.debug(`OT.Subscriber.connectionStateChanged to ${state}`);
38086
- if (_subscriberConnectionState === currentConnectionState || state === 'failed' && !_session._.isSocketConnected()) {
38072
+ if (state === 'failed' && !_session._.isSocketConnected()) {
38087
38073
  return;
38088
38074
  }
38089
38075
 
@@ -38113,7 +38099,6 @@ function SubscriberFactory(_ref2) {
38113
38099
  if (sourceStreamId === _activeSourceStreamId) {
38114
38100
  updateWidgetView(currentConnectionState);
38115
38101
  notifyStateChange(state, currentConnectionState, sourceStreamId);
38116
- _subscriberConnectionState = currentConnectionState;
38117
38102
  }
38118
38103
  };
38119
38104
  const onIceRestartSuccess = () => {