@opentok/client 2.32.0-alpha.5 → 2.32.0-alpha.6

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.32.0 255a6c896
2
+ * @license OpenTok.js 2.32.0 b719cd251
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, 15 Oct 2025 07:11:26 GMT
8
+ * Date: Wed, 15 Oct 2025 10:06:44 GMT
9
9
  */
10
10
 
11
11
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -5482,7 +5482,8 @@ SDPHelpers.patterns = {
5482
5482
  // ssrc sample: a=ssrc:3 cname:1E7BE30B-C693-4570-B552-34244D6F04C1
5483
5483
  ssrc: 'a=ssrc:',
5484
5484
  // msid sample: a=msid:McwRQfjkv8dWA33jaqKHwuBh6ovY0TxNpBZB 3c18dd96-8af5-4e07-856d-0cd21e0203b8
5485
- msid: 'a=msid:'
5485
+ msid: 'a=msid:',
5486
+ extension: 'a=extmap:'
5486
5487
  };
5487
5488
 
5488
5489
  // Get index from first match starting at 'startIndex'
@@ -5709,6 +5710,8 @@ SDPHelpers.getIceCredentials = sdpLines => {
5709
5710
  });
5710
5711
  return credentials;
5711
5712
  };
5713
+ SDPHelpers.isExtensionLine = line => line.includes(SDPHelpers.patterns.extension);
5714
+ SDPHelpers.getExtensions = section => section.filter(SDPHelpers.isExtensionLine);
5712
5715
 
5713
5716
  /**
5714
5717
  * Update ice credentials in one SDP with new credentials.
@@ -8547,7 +8550,7 @@ function staticConfigFactory(_temp) {
8547
8550
  _ref$axios = _ref.axios,
8548
8551
  axios = _ref$axios === void 0 ? _axios.default : _ref$axios,
8549
8552
  _ref$properties = _ref.properties,
8550
- properties = _ref$properties === void 0 ? {"version":"v2.32.0","buildHash":"255a6c896","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","vonageApiURL":""} : _ref$properties;
8553
+ properties = _ref$properties === void 0 ? {"version":"v2.32.0","buildHash":"b719cd251","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","vonageApiURL":""} : _ref$properties;
8551
8554
  /** @type builtInConfig */
8552
8555
  const builtInConfig = (0, _cloneDeep.default)(properties);
8553
8556
  /**
@@ -84263,7 +84266,8 @@ let SinglePeerConnectionController = /*#__PURE__*/function () {
84263
84266
  while (1) switch (_context.prev = _context.next) {
84264
84267
  case 0:
84265
84268
  return _context.abrupt("return", new Promise(resolve => {
84266
- const createAnswer = () => {
84269
+ const createAnswer = offer => {
84270
+ this._peerConnectionSDP.removeExtensions(offer.sdp);
84267
84271
  const answer = this._peerConnectionSDP.createSdp();
84268
84272
  this._peerConnection.processMessage('answer', {
84269
84273
  content: {
@@ -84638,6 +84642,7 @@ const createPeerConnectionSDP = function createPeerConnectionSDP(deps) {
84638
84642
  this.sdp.headers = sdpHelpers.updateIceCredentials(updatedHeaders, iceCredentials);
84639
84643
  this.sdp.iceCredentials = iceCredentials;
84640
84644
  this.sdp.mediaSections = sdpHelpers.updateFirstEnabledMediaSection(this.sdp, iceCredentials);
84645
+ this.removeExtensions(newSdp);
84641
84646
  return sdpHelpers.createSDP(this.sdp.headers, this.sdp.mediaSections);
84642
84647
  },
84643
84648
  getPartialSdpAnswer(newAnswer) {
@@ -84688,6 +84693,21 @@ const createPeerConnectionSDP = function createPeerConnectionSDP(deps) {
84688
84693
  isHead(subscriberPcId) {
84689
84694
  const headMid = this.getHeadMid();
84690
84695
  return this.subscribePcIdsByMid[headMid] === subscriberPcId;
84696
+ },
84697
+ removeExtensions(sdp) {
84698
+ var _this$sdp$mediaSectio;
84699
+ const sdpLines = sdpHelpers.getSDPLines(sdp);
84700
+ (_this$sdp$mediaSectio = this.sdp.mediaSections) == null ? void 0 : _this$sdp$mediaSectio.forEach((section, sectionIndex) => {
84701
+ const mid = sdpHelpers.getSectionMid(section);
84702
+ if (!mid) return;
84703
+ const offerSection = sdpHelpers.getTrackSection(sdpLines, mid);
84704
+ const extensions = sdpHelpers.getExtensions(section);
84705
+ extensions.forEach(extLine => {
84706
+ if (!offerSection.sdp.includes(extLine)) {
84707
+ this.sdp.mediaSections[sectionIndex] = this.sdp.mediaSections[sectionIndex].filter(line => line !== extLine);
84708
+ }
84709
+ });
84710
+ });
84691
84711
  }
84692
84712
  };
84693
84713
  return peerConnectionSDP;