@webex/web-client-media-engine 3.0.0 → 3.0.1

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.
package/dist/cjs/index.js CHANGED
@@ -9938,26 +9938,26 @@ class SendOnlyTransceiver extends Transceiver {
9938
9938
  }
9939
9939
  updateSendParameters(requestedIdEncodingParamsMap) {
9940
9940
  return __awaiter(this, void 0, void 0, function* () {
9941
- if (!this.publishedStream)
9942
- return;
9943
- this.setStreamRequested(requestedIdEncodingParamsMap.size > 0);
9944
- const sendParameters = this.sender.getParameters();
9945
- sendParameters.encodings.forEach((encoding, index) => {
9946
- var _a, _b;
9947
- const encodingParams = requestedIdEncodingParamsMap.get(index);
9948
- encoding.active = !!encodingParams;
9949
- if (encodingParams) {
9950
- const { maxPayloadBitsPerSecond, maxFs, maxWidth, maxHeight } = encodingParams;
9951
- const scaleDownRatio = getScaleDownRatio((_a = this.publishedStream) === null || _a === void 0 ? void 0 : _a.getSettings().width, (_b = this.publishedStream) === null || _b === void 0 ? void 0 : _b.getSettings().height, maxFs, maxWidth, maxHeight);
9952
- if (maxPayloadBitsPerSecond !== undefined && maxPayloadBitsPerSecond >= 0) {
9953
- encoding.maxBitrate = maxPayloadBitsPerSecond;
9954
- }
9955
- if (scaleDownRatio !== undefined && scaleDownRatio >= 1.0) {
9956
- encoding.scaleResolutionDownBy = scaleDownRatio;
9941
+ if (this.publishedStream) {
9942
+ this.setStreamRequested(requestedIdEncodingParamsMap.size > 0);
9943
+ const sendParameters = this.sender.getParameters();
9944
+ sendParameters.encodings.forEach((encoding, index) => {
9945
+ var _a, _b;
9946
+ const encodingParams = requestedIdEncodingParamsMap.get(index);
9947
+ encoding.active = !!encodingParams;
9948
+ if (encodingParams) {
9949
+ const { maxPayloadBitsPerSecond, maxFs, maxWidth, maxHeight } = encodingParams;
9950
+ const scaleDownRatio = getScaleDownRatio((_a = this.publishedStream) === null || _a === void 0 ? void 0 : _a.getSettings().width, (_b = this.publishedStream) === null || _b === void 0 ? void 0 : _b.getSettings().height, maxFs, maxWidth, maxHeight);
9951
+ if (maxPayloadBitsPerSecond !== undefined && maxPayloadBitsPerSecond >= 0) {
9952
+ encoding.maxBitrate = maxPayloadBitsPerSecond;
9953
+ }
9954
+ if (scaleDownRatio !== undefined && scaleDownRatio >= 1.0) {
9955
+ encoding.scaleResolutionDownBy = scaleDownRatio;
9956
+ }
9957
9957
  }
9958
- }
9959
- });
9960
- yield this.sender.setParameters(sendParameters);
9958
+ });
9959
+ yield this.sender.setParameters(sendParameters);
9960
+ }
9961
9961
  this.requestedIdEncodingParamsMap = requestedIdEncodingParamsMap;
9962
9962
  });
9963
9963
  }
package/dist/esm/index.js CHANGED
@@ -9934,26 +9934,26 @@ class SendOnlyTransceiver extends Transceiver {
9934
9934
  }
9935
9935
  updateSendParameters(requestedIdEncodingParamsMap) {
9936
9936
  return __awaiter(this, void 0, void 0, function* () {
9937
- if (!this.publishedStream)
9938
- return;
9939
- this.setStreamRequested(requestedIdEncodingParamsMap.size > 0);
9940
- const sendParameters = this.sender.getParameters();
9941
- sendParameters.encodings.forEach((encoding, index) => {
9942
- var _a, _b;
9943
- const encodingParams = requestedIdEncodingParamsMap.get(index);
9944
- encoding.active = !!encodingParams;
9945
- if (encodingParams) {
9946
- const { maxPayloadBitsPerSecond, maxFs, maxWidth, maxHeight } = encodingParams;
9947
- const scaleDownRatio = getScaleDownRatio((_a = this.publishedStream) === null || _a === void 0 ? void 0 : _a.getSettings().width, (_b = this.publishedStream) === null || _b === void 0 ? void 0 : _b.getSettings().height, maxFs, maxWidth, maxHeight);
9948
- if (maxPayloadBitsPerSecond !== undefined && maxPayloadBitsPerSecond >= 0) {
9949
- encoding.maxBitrate = maxPayloadBitsPerSecond;
9950
- }
9951
- if (scaleDownRatio !== undefined && scaleDownRatio >= 1.0) {
9952
- encoding.scaleResolutionDownBy = scaleDownRatio;
9937
+ if (this.publishedStream) {
9938
+ this.setStreamRequested(requestedIdEncodingParamsMap.size > 0);
9939
+ const sendParameters = this.sender.getParameters();
9940
+ sendParameters.encodings.forEach((encoding, index) => {
9941
+ var _a, _b;
9942
+ const encodingParams = requestedIdEncodingParamsMap.get(index);
9943
+ encoding.active = !!encodingParams;
9944
+ if (encodingParams) {
9945
+ const { maxPayloadBitsPerSecond, maxFs, maxWidth, maxHeight } = encodingParams;
9946
+ const scaleDownRatio = getScaleDownRatio((_a = this.publishedStream) === null || _a === void 0 ? void 0 : _a.getSettings().width, (_b = this.publishedStream) === null || _b === void 0 ? void 0 : _b.getSettings().height, maxFs, maxWidth, maxHeight);
9947
+ if (maxPayloadBitsPerSecond !== undefined && maxPayloadBitsPerSecond >= 0) {
9948
+ encoding.maxBitrate = maxPayloadBitsPerSecond;
9949
+ }
9950
+ if (scaleDownRatio !== undefined && scaleDownRatio >= 1.0) {
9951
+ encoding.scaleResolutionDownBy = scaleDownRatio;
9952
+ }
9953
9953
  }
9954
- }
9955
- });
9956
- yield this.sender.setParameters(sendParameters);
9954
+ });
9955
+ yield this.sender.setParameters(sendParameters);
9956
+ }
9957
9957
  this.requestedIdEncodingParamsMap = requestedIdEncodingParamsMap;
9958
9958
  });
9959
9959
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webex/web-client-media-engine",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "Web Client Media Engine is common web code for interacting with the multistream media server.",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/cjs/index.js",