@opentok/client 2.29.2-alpha.4 → 2.29.2-alpha.5

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.29.2 53b9a62
2
+ * @license OpenTok.js 2.29.2 1953c64
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, 26 Feb 2025 02:17:26 GMT
8
+ * Date: Fri, 28 Feb 2025 17:12:28 GMT
9
9
  */
10
10
 
11
11
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -8291,7 +8291,7 @@ const logging = (0, _log.default)('StaticConfig');
8291
8291
  */
8292
8292
 
8293
8293
  /** @type builtInConfig */
8294
- const builtInConfig = (0, _cloneDeep.default)({"version":"v2.29.2","buildHash":"53b9a62","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"});
8294
+ const builtInConfig = (0, _cloneDeep.default)({"version":"v2.29.2","buildHash":"1953c64","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"});
8295
8295
  const whitelistAllowedRuntimeProperties = (0, _pick.default)(['apiURL', 'assetURL', 'cdnURL', 'sessionInfoOverrides', 'loggingURL']);
8296
8296
  const liveConfigMap = {
8297
8297
  apiUrl: 'apiURL',
@@ -12612,7 +12612,7 @@ function RafRunner(callback) {
12612
12612
  return;
12613
12613
  }
12614
12614
  running = true;
12615
- window.requestAnimationFrame(loop);
12615
+ cancelId = window.requestAnimationFrame(loop);
12616
12616
  };
12617
12617
  this.stop = () => {
12618
12618
  window.cancelAnimationFrame(cancelId);
@@ -73742,6 +73742,7 @@ var _default = _ref => {
73742
73742
  audioLevelSampler = _ref.audioLevelSampler;
73743
73743
  let loudness = 0;
73744
73744
  let loudnessLastAccess = 0;
73745
+ let destroyed = false;
73745
73746
  const audioLevelRunner = new _RafRunner.default(() => {
73746
73747
  const listenerCount = subscriber.listenerCount(_eventNames.default.AUDIO_LEVEL_UPDATED);
73747
73748
  const shouldStopWatchingAudio = () => (0, _now.default)() - loudnessLastAccess > 10000 && listenerCount === 0;
@@ -73767,7 +73768,9 @@ var _default = _ref => {
73767
73768
  };
73768
73769
  Object.defineProperty(subscriber, 'loudness', {
73769
73770
  get() {
73770
- audioLevelRunner.start();
73771
+ if (!destroyed) {
73772
+ audioLevelRunner.start();
73773
+ }
73771
73774
  loudnessLastAccess = (0, _now.default)();
73772
73775
  return loudness;
73773
73776
  },
@@ -73782,6 +73785,7 @@ var _default = _ref => {
73782
73785
  addListeners();
73783
73786
  return {
73784
73787
  destroy() {
73788
+ destroyed = true;
73785
73789
  audioLevelSampler.destroy();
73786
73790
  audioLevelRunner.stop();
73787
73791
  removeListeners();