@bigbinary/neeto-media-recorder 2.4.1 → 2.4.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.
package/core.js CHANGED
@@ -815,6 +815,9 @@ function getChromiumVersion() {
815
815
  }
816
816
  return null;
817
817
  }
818
+ var versionToInteger = function versionToInteger(version) {
819
+ return parseInt(version.replaceAll(".", ""));
820
+ };
818
821
  var getSupportedMimeType = function getSupportedMimeType(fallback) {
819
822
  if (MediaRecorder.isTypeSupported(MIME_TYPE.mp4)) {
820
823
  if (platform.name === "Safari") {
@@ -824,7 +827,7 @@ var getSupportedMimeType = function getSupportedMimeType(fallback) {
824
827
  if (isNil(chromiumVersion)) {
825
828
  return MIME_TYPE.webmH264;
826
829
  }
827
- var isChromiumVersionSupported = chromiumVersion >= MINIMUM_CHROMIUM_VERSION_FOR_MP4;
830
+ var isChromiumVersionSupported = versionToInteger(chromiumVersion) >= versionToInteger(MINIMUM_CHROMIUM_VERSION_FOR_MP4);
828
831
  if (isChromiumVersionSupported) {
829
832
  return MIME_TYPE.mp4;
830
833
  }
@@ -1644,7 +1647,7 @@ var ScreenRecorder = /*#__PURE__*/function () {
1644
1647
  _classPrivateFieldGet(_this, _store).setState(pick(["elapsedTime", "countdownTimeLeft"], initialState));
1645
1648
  _classPrivateFieldSet(_this, _mediaChunks, []);
1646
1649
  _classPrivateFieldGet(_this, _fireCallbacks).call(_this, SCREEN_RECORDER_EVENT.onRestart);
1647
- _classPrivateFieldGet(_this, _countdownAndStartRecording).call(_this);
1650
+ _this.startRecording();
1648
1651
  });
1649
1652
  _defineProperty(this, "resetState", function () {
1650
1653
  _classPrivateFieldSet(_this, _mediaChunks, []);
@@ -1813,6 +1816,7 @@ var ScreenRecorder = /*#__PURE__*/function () {
1813
1816
  writable: true,
1814
1817
  value: function value(_ref2) {
1815
1818
  var data = _ref2.data;
1819
+ logger.info("received data in onRecordingActive");
1816
1820
  if (data.size <= 0) return;
1817
1821
  _classPrivateFieldGet(_this, _mediaChunks).push(data);
1818
1822
  _classPrivateFieldGet(_this, _fireCallbacks).call(_this, SCREEN_RECORDER_EVENT.onDataAvailable, [data]);
@@ -1821,6 +1825,7 @@ var ScreenRecorder = /*#__PURE__*/function () {
1821
1825
  _classPrivateFieldInitSpec(this, _onRecordingStop, {
1822
1826
  writable: true,
1823
1827
  value: function value() {
1828
+ logger.info("stopping recording in onRecordingStop");
1824
1829
  _classPrivateFieldGet(_this, _store).setState({
1825
1830
  status: SCREEN_RECORDER_STATUS.stopped
1826
1831
  });