@opentok/client 2.29.1-alpha.2 → 2.29.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.
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @license OpenTok.js 2.29.1 8fbbd2e
2
+ * @license OpenTok.js 2.29.1 91daf55
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: Mon, 10 Feb 2025 18:53:28 GMT
8
+ * Date: Mon, 10 Feb 2025 22:25:21 GMT
9
9
  */
10
10
 
11
11
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -8118,7 +8118,7 @@ const logging = (0, _log.default)('StaticConfig');
8118
8118
  */
8119
8119
 
8120
8120
  /** @type builtInConfig */
8121
- const builtInConfig = (0, _cloneDeep.default)({"version":"v2.29.1","buildHash":"8fbbd2e","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"});
8121
+ const builtInConfig = (0, _cloneDeep.default)({"version":"v2.29.1","buildHash":"91daf55","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"});
8122
8122
  const whitelistAllowedRuntimeProperties = (0, _pick.default)(['apiURL', 'assetURL', 'cdnURL', 'sessionInfoOverrides', 'loggingURL']);
8123
8123
  const liveConfigMap = {
8124
8124
  apiUrl: 'apiURL',
@@ -56865,10 +56865,7 @@ function listenForTracksEndedFactory() {
56865
56865
  }, 100);
56866
56866
  }
56867
56867
  function removeTrackListener(track) {
56868
- if (track.onended === singleTrackEndedHandler) {
56869
- track.onended = null; // eslint-disable-line no-param-reassign
56870
- }
56871
-
56868
+ track.onended = null; // eslint-disable-line no-param-reassign
56872
56869
  const index = tracks.indexOf(track);
56873
56870
  if (index >= 0) {
56874
56871
  tracks.splice(index, 1);
@@ -56880,10 +56877,19 @@ function listenForTracksEndedFactory() {
56880
56877
  function addTrackListeners() {
56881
56878
  stream.getTracks().forEach(track => {
56882
56879
  tracks.push(track);
56883
- track.onended = singleTrackEndedHandler; // eslint-disable-line no-param-reassign
56880
+ const originalOnEnded = track.onended;
56881
+ // eslint-disable-next-line no-param-reassign
56882
+ track.onended = function () {
56883
+ if (originalOnEnded) {
56884
+ // When self-subscribing to a published stream, both the publisher and self-subscriber
56885
+ // are referencing the same object. After a subscriber is created, the onended listener
56886
+ // for the publisher will be overwritten unless we store it. See VIDCS-3131.
56887
+ originalOnEnded(...arguments);
56888
+ }
56889
+ singleTrackEndedHandler(...arguments);
56890
+ };
56884
56891
  });
56885
56892
  }
56886
-
56887
56893
  addTrackListeners();
56888
56894
  return {
56889
56895
  stop: removeAllTrackListeners,