@bigbinary/neeto-media-recorder 2.7.9 → 2.7.11

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/core.js CHANGED
@@ -547,6 +547,17 @@ function v4(options, buf, offset) {
547
547
  return unsafeStringify(rnds);
548
548
  }
549
549
 
550
+ var create$2 = function create(_ref) {
551
+ var recordingId = _ref.recordingId,
552
+ payload = _ref.payload;
553
+ return axios.post("/api/v1/recordings/".concat(recordingId, "/abort_upload"), {
554
+ abortUpload: payload
555
+ });
556
+ };
557
+ var abortUploadApi = {
558
+ create: create$2
559
+ };
560
+
550
561
  function _setPrototypeOf(t, e) {
551
562
  return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
552
563
  return t.__proto__ = e, t;
@@ -783,18 +794,6 @@ var buildRetryableApi = function buildRetryableApi(apiConnector) {
783
794
  }();
784
795
  };
785
796
 
786
- var create$2 = function create(_ref) {
787
- var recordingId = _ref.recordingId,
788
- payload = _ref.payload;
789
- return axios.post("/api/v1/recordings/".concat(recordingId, "/abort_upload"), {
790
- abortUpload: payload
791
- });
792
- };
793
- var retryableCreate$2 = buildRetryableApi(create$2);
794
- var abortUploadApi = {
795
- create: retryableCreate$2
796
- };
797
-
798
797
  var create$1 = function create(_ref) {
799
798
  var recordingId = _ref.recordingId,
800
799
  payload = _ref.payload,
@@ -838,8 +837,7 @@ var checkConstraints = function checkConstraints() {
838
837
  return _typeof$1(mediaType) === "object";
839
838
  }).map(getUnSupportedConstraints).flat();
840
839
  if (isNotEmpty(unSupportedConstraints)) {
841
- // eslint-disable-next-line no-console
842
- console.error("The constraints ".concat(unSupportedConstraints.join(","), " doesn't support on this browser."));
840
+ logger.error("The constraints ".concat(unSupportedConstraints.join(","), " doesn't support on this browser."));
843
841
  }
844
842
  };
845
843
  var isStreamEnded = function isStreamEnded(mediaStream) {
@@ -1247,7 +1245,8 @@ var MultipartS3Uploader = /*#__PURE__*/function () {
1247
1245
  return _classPrivateFieldGet(_this, _completeUploadPromise);
1248
1246
  case 14:
1249
1247
  _classPrivateFieldGet(_this, _abortController).abort();
1250
- _context2.next = 17;
1248
+ _classPrivateFieldGet(_this, _logger$1).info("abortUpload -> aborting...");
1249
+ _context2.next = 18;
1251
1250
  return abortUploadApi.create({
1252
1251
  recordingId: recordingId,
1253
1252
  payload: {
@@ -1256,7 +1255,7 @@ var MultipartS3Uploader = /*#__PURE__*/function () {
1256
1255
  logs: sessionLogs
1257
1256
  }
1258
1257
  });
1259
- case 17:
1258
+ case 18:
1260
1259
  _classPrivateFieldGet(_this, _logger$1).info("abortUpload -> abort successful");
1261
1260
  _classPrivateFieldGet(_this, _fireCallbacks$1).call(_this, UPLOAD_EVENT.onAbort);
1262
1261
  _classPrivateFieldSet(_this, _unUploadedChunks, []);
@@ -1264,17 +1263,17 @@ var MultipartS3Uploader = /*#__PURE__*/function () {
1264
1263
  _classPrivateFieldSet(_this, _s3PartUploadPromises, []);
1265
1264
  _classPrivateFieldSet(_this, _status2, "");
1266
1265
  _classPrivateFieldSet(_this, _abortController, null);
1267
- _context2.next = 29;
1266
+ _context2.next = 30;
1268
1267
  break;
1269
- case 26:
1270
- _context2.prev = 26;
1268
+ case 27:
1269
+ _context2.prev = 27;
1271
1270
  _context2.t0 = _context2["catch"](2);
1272
- _classPrivateFieldGet(_this, _logger$1).error(_context2.t0);
1273
- case 29:
1271
+ _classPrivateFieldGet(_this, _logger$1).error("abortUpload -> abort failed", _context2.t0 === null || _context2.t0 === void 0 ? void 0 : _context2.t0.message);
1272
+ case 30:
1274
1273
  case "end":
1275
1274
  return _context2.stop();
1276
1275
  }
1277
- }, _callee2, null, [[2, 26]]);
1276
+ }, _callee2, null, [[2, 27]]);
1278
1277
  })));
1279
1278
  _defineProperty(this, "resetState", function () {
1280
1279
  _classPrivateFieldSet(_this, _recordingId, "");
@@ -1951,8 +1950,7 @@ var ScreenRecorder = /*#__PURE__*/function () {
1951
1950
  case 27:
1952
1951
  _context2.prev = 27;
1953
1952
  _context2.t4 = _context2["catch"](14);
1954
- // eslint-disable-next-line no-console
1955
- console.error("Failed to load audio worklet:", _context2.t4);
1953
+ logger.error("Failed to load audio worklet:", _context2.t4);
1956
1954
  case 30:
1957
1955
  if (!_classPrivateFieldGet(_this, _videoStream)) {
1958
1956
  _context2.next = 34;