@opentok/client 2.27.3-beta.6 → 2.27.3-beta.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.
@@ -151,6 +151,7 @@ declare namespace OT {
151
151
  videoFilter?: VideoFilter;
152
152
  audioFilter?: AudioFilter;
153
153
  _disableAutoDeviceSwitch: boolean;
154
+ _audioInputEventName: string;
154
155
  };
155
156
 
156
157
  export type SubscriberStyle = WidgetStyle & {
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license OpenTok.js 2.27.3-beta.06 008c5f0
2
+ * @license OpenTok.js 2.27.3-beta.07 f6a6649
3
3
  *
4
4
  * Copyright (c) 2010-2024 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: Mon, 22 Apr 2024 20:16:08 GMT
8
+ * Date: Mon, 22 Apr 2024 21:44:17 GMT
9
9
  */
10
10
 
11
11
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -3960,8 +3960,8 @@ function EventsFactory(deps) {
3960
3960
  * @class AudioInputDeviceChanged
3961
3961
  * @augments Event
3962
3962
  */
3963
- Events.AudioInputDeviceChanged = function AudioInputDeviceChanged(device) {
3964
- return new _Event4.default(_eventNames.default.AUDIO_INPUT_DEVICE_CHANGED, false, {
3963
+ Events.AudioInputDeviceChanged = function AudioInputDeviceChanged(device, eventName) {
3964
+ return new _Event4.default(eventName || _eventNames.default.AUDIO_INPUT_DEVICE_CHANGED, false, {
3965
3965
  device
3966
3966
  });
3967
3967
  };
@@ -7952,7 +7952,7 @@ const logging = (0, _log.default)('StaticConfig');
7952
7952
  */
7953
7953
 
7954
7954
  /** @type builtInConfig */
7955
- const builtInConfig = (0, _cloneDeep.default)({"version":"v2.27.3-beta.06","buildHash":"008c5f0","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"});
7955
+ const builtInConfig = (0, _cloneDeep.default)({"version":"v2.27.3-beta.07","buildHash":"f6a6649","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"});
7956
7956
  const whitelistAllowedRuntimeProperties = (0, _pick.default)(['apiURL', 'assetURL', 'cdnURL', 'sessionInfoOverrides', 'loggingURL']);
7957
7957
  const liveConfigMap = {
7958
7958
  apiUrl: 'apiURL',
@@ -18364,7 +18364,7 @@ function PublisherFactory(_ref) {
18364
18364
  audioDevices = processedOptions.audioDevices;
18365
18365
  videoDevices = processedOptions.videoDevices;
18366
18366
  hasVideoFilter = !!properties.videoFilter; // this is needed to refresh current audio input device after previous one was disconnected
18367
- removeDeviceChangeListener = (0, _audioInputDevicesChangeListener.default)(_this, properties._disableAutoDeviceSwitch);
18367
+ removeDeviceChangeListener = (0, _audioInputDevicesChangeListener.default)(_this, properties._disableAutoDeviceSwitch, properties._audioInputEventName);
18368
18368
  (0, _permissionListener.default)(_this);
18369
18369
  if (hasVideoFilter) {
18370
18370
  // We need to get the device now, before the filter is applied
@@ -96702,10 +96702,13 @@ const Events = (0, _events.default)();
96702
96702
  const audioInputDevicesChangeHandler = (0, _audioInputDevicesChangeHandler.default)();
96703
96703
  const _getNativeMediaDevice = (0, _deviceHelpers.default)(),
96704
96704
  getNativeMediaDevices = _getNativeMediaDevice.getNativeMediaDevices;
96705
- var _default = function _default(publisher, disableDeviceSwitch) {
96705
+ var _default = function _default(publisher, disableDeviceSwitch, eventName) {
96706
96706
  if (disableDeviceSwitch === void 0) {
96707
96707
  disableDeviceSwitch = false;
96708
96708
  }
96709
+ if (eventName === void 0) {
96710
+ eventName = '';
96711
+ }
96709
96712
  let isProcessing = false;
96710
96713
  const deviceChangeListener = /*#__PURE__*/function () {
96711
96714
  var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
@@ -96726,7 +96729,7 @@ var _default = function _default(publisher, disableDeviceSwitch) {
96726
96729
  device = _context.sent;
96727
96730
  isProcessing = false;
96728
96731
  if (disableDeviceSwitch) {
96729
- _context.next = 10;
96732
+ _context.next = 11;
96730
96733
  break;
96731
96734
  }
96732
96735
  _context.next = 10;
@@ -96734,6 +96737,10 @@ var _default = function _default(publisher, disableDeviceSwitch) {
96734
96737
  case 10:
96735
96738
  publisher.dispatchEvent(new Events.AudioInputDeviceChanged(device));
96736
96739
  case 11:
96740
+ if (disableDeviceSwitch && eventName) {
96741
+ publisher.dispatchEvent(new Events.AudioInputDeviceChanged(device, eventName));
96742
+ }
96743
+ case 12:
96737
96744
  case "end":
96738
96745
  return _context.stop();
96739
96746
  }