@flashphoner/websdk 2.0.259 → 2.0.260

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.
@@ -11354,6 +11354,65 @@ var createSession = function createSession(options) {
11354
11354
  throw new Error("This function available for publishing stream only");
11355
11355
  }
11356
11356
  };
11357
+
11358
+ /**
11359
+ * Get camera zoom capabilities
11360
+ *
11361
+ * @return {Object} zoom capabilities object: max, min, step or null if zoom is not supported
11362
+ * @memberof Stream
11363
+ */
11364
+ var getZoomCapabilities = function getZoomCapabilities() {
11365
+ if (published() && mediaConnection) {
11366
+ return mediaConnection.getZoomCapabilities();
11367
+ } else {
11368
+ throw new Error("This function available for publishing stream only");
11369
+ }
11370
+ };
11371
+
11372
+ /**
11373
+ * Get current camera zoom value if supported
11374
+ *
11375
+ * @return {number} current camera zoom value
11376
+ * @memberof Stream
11377
+ */
11378
+ var getZoom = function getZoom() {
11379
+ if (published() && mediaConnection) {
11380
+ return mediaConnection.getZoom();
11381
+ } else {
11382
+ throw new Error("This function available for publishing stream only");
11383
+ }
11384
+ };
11385
+
11386
+ /**
11387
+ * Set camera zoom value if supported
11388
+ *
11389
+ * @param {number} desired camera zoom value
11390
+ * @memberof Stream
11391
+ */
11392
+ var setZoom = /*#__PURE__*/function () {
11393
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(value) {
11394
+ return _regenerator().w(function (_context2) {
11395
+ while (1) switch (_context2.n) {
11396
+ case 0:
11397
+ if (!(published() && mediaConnection)) {
11398
+ _context2.n = 2;
11399
+ break;
11400
+ }
11401
+ _context2.n = 1;
11402
+ return mediaConnection.setZoom(value);
11403
+ case 1:
11404
+ return _context2.a(2, _context2.v);
11405
+ case 2:
11406
+ throw new Error("This function available for publishing stream only");
11407
+ case 3:
11408
+ return _context2.a(2);
11409
+ }
11410
+ }, _callee2);
11411
+ }));
11412
+ return function setZoom(_x2) {
11413
+ return _ref2.apply(this, arguments);
11414
+ };
11415
+ }();
11357
11416
  stream.play = play;
11358
11417
  stream.publish = publish;
11359
11418
  stream.stop = _stop;
@@ -11395,6 +11454,9 @@ var createSession = function createSession(options) {
11395
11454
  stream.getLogger = getLogger;
11396
11455
  stream.updateVideoSettings = updateVideoSettings;
11397
11456
  stream.updateVideoResolution = updateVideoResolution;
11457
+ stream.getZoomCapabilities = getZoomCapabilities;
11458
+ stream.getZoom = getZoom;
11459
+ stream.setZoom = setZoom;
11398
11460
  streams[id_] = stream;
11399
11461
  return stream;
11400
11462
  };