@bigbinary/neeto-media-recorder 2.7.8 → 2.7.9
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/constants.js +3 -1
- package/constants.js.map +1 -1
- package/core.js +118 -38
- package/core.js.map +1 -1
- package/index.js +42 -19
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/src/translations/en.json +2 -1
package/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { shallow } from 'zustand/shallow';
|
|
|
2
2
|
import { useState, useRef, useCallback, useEffect, forwardRef, useImperativeHandle } from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import { isNotEmpty, noop } from '@bigbinary/neeto-cist';
|
|
5
|
-
import { SCREEN_RECORDER_STATUS, UPLOAD_STATUS as UPLOAD_STATUS$1, ONE_SECOND_IN_MILLISECONDS as ONE_SECOND_IN_MILLISECONDS$1, MIME_TYPE as MIME_TYPE$1, ONE_MINUTE_IN_MILLISECONDS as ONE_MINUTE_IN_MILLISECONDS$1, IS_EXTENSION as IS_EXTENSION$1, SCREEN_RECORDER_ERROR, IS_SAFARI_EXTENSION, MIC_NOT_WORKING_SILENCE_TIMEOUT, SCREEN_RECORDER_EVENT, UPLOAD_EVENT } from '@bigbinary/neeto-media-recorder/constants';
|
|
5
|
+
import { SCREEN_RECORDER_STATUS, UPLOAD_STATUS as UPLOAD_STATUS$1, ONE_SECOND_IN_MILLISECONDS as ONE_SECOND_IN_MILLISECONDS$1, MIME_TYPE as MIME_TYPE$1, ONE_MINUTE_IN_MILLISECONDS as ONE_MINUTE_IN_MILLISECONDS$1, IS_EXTENSION as IS_EXTENSION$1, SCREEN_RECORDER_ERROR, IS_SAFARI_EXTENSION, MIC_NOT_WORKING_SILENCE_TIMEOUT, SCREEN_RECORDER_EVENT, COUNTDOWN_TIME, UPLOAD_EVENT } from '@bigbinary/neeto-media-recorder/constants';
|
|
6
6
|
import { screenRecorder, useMultipartS3UploadStatus, getMultipartS3Uploader } from '@bigbinary/neeto-media-recorder/core';
|
|
7
7
|
import PageLoader from '@bigbinary/neeto-molecules/PageLoader';
|
|
8
8
|
import Alert from '@bigbinary/neetoui/Alert';
|
|
@@ -703,7 +703,8 @@ var _excluded = ["size"],
|
|
|
703
703
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
704
704
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
705
705
|
var PlayIcon = function PlayIcon(_ref) {
|
|
706
|
-
var size = _ref.size,
|
|
706
|
+
var _ref$size = _ref.size,
|
|
707
|
+
size = _ref$size === void 0 ? 24 : _ref$size,
|
|
707
708
|
other = _objectWithoutProperties(_ref, _excluded);
|
|
708
709
|
return /*#__PURE__*/jsx("svg", _objectSpread(_objectSpread({
|
|
709
710
|
height: size,
|
|
@@ -717,11 +718,9 @@ var PlayIcon = function PlayIcon(_ref) {
|
|
|
717
718
|
})
|
|
718
719
|
}));
|
|
719
720
|
};
|
|
720
|
-
PlayIcon.defaultProps = {
|
|
721
|
-
size: 24
|
|
722
|
-
};
|
|
723
721
|
var StopIcon = function StopIcon(_ref2) {
|
|
724
|
-
var size = _ref2.size,
|
|
722
|
+
var _ref2$size = _ref2.size,
|
|
723
|
+
size = _ref2$size === void 0 ? 24 : _ref2$size,
|
|
725
724
|
other = _objectWithoutProperties(_ref2, _excluded2);
|
|
726
725
|
return /*#__PURE__*/jsx("svg", _objectSpread(_objectSpread({
|
|
727
726
|
height: size,
|
|
@@ -735,11 +734,9 @@ var StopIcon = function StopIcon(_ref2) {
|
|
|
735
734
|
})
|
|
736
735
|
}));
|
|
737
736
|
};
|
|
738
|
-
StopIcon.defaultProps = {
|
|
739
|
-
size: 24
|
|
740
|
-
};
|
|
741
737
|
var RestartIcon = function RestartIcon(_ref3) {
|
|
742
|
-
var size = _ref3.size,
|
|
738
|
+
var _ref3$size = _ref3.size,
|
|
739
|
+
size = _ref3$size === void 0 ? 24 : _ref3$size,
|
|
743
740
|
other = _objectWithoutProperties(_ref3, _excluded3);
|
|
744
741
|
return /*#__PURE__*/jsx("svg", _objectSpread(_objectSpread({
|
|
745
742
|
height: size,
|
|
@@ -755,9 +752,6 @@ var RestartIcon = function RestartIcon(_ref3) {
|
|
|
755
752
|
})
|
|
756
753
|
}));
|
|
757
754
|
};
|
|
758
|
-
RestartIcon.defaultProps = {
|
|
759
|
-
size: 24
|
|
760
|
-
};
|
|
761
755
|
|
|
762
756
|
var useRecorderStatus = function useRecorderStatus() {
|
|
763
757
|
var useRecorderStore = screenRecorder.useRecorderStore;
|
|
@@ -1853,15 +1847,44 @@ var MediaRecorder = function MediaRecorder(_ref, ref) {
|
|
|
1853
1847
|
})
|
|
1854
1848
|
})
|
|
1855
1849
|
}), isRecorderStatus(SCREEN_RECORDER_STATUS.media_acquired, SCREEN_RECORDER_STATUS.restarting) && /*#__PURE__*/jsxs("div", {
|
|
1856
|
-
className: "mx-auto flex flex-col items-center justify-center
|
|
1850
|
+
className: "neeto-ui-rounded-lg mx-auto mb-8 flex w-full max-w-4xl flex-col items-center justify-center p-12",
|
|
1857
1851
|
"data-cy": "recorder-countdown-wrapper",
|
|
1858
|
-
children: [/*#__PURE__*/jsx(
|
|
1852
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
1853
|
+
className: "relative mb-8",
|
|
1854
|
+
children: /*#__PURE__*/jsxs("div", {
|
|
1855
|
+
className: "relative flex h-32 w-32 items-center justify-center",
|
|
1856
|
+
children: [/*#__PURE__*/jsxs("svg", {
|
|
1857
|
+
className: "absolute h-32 w-32 -rotate-90 transform",
|
|
1858
|
+
viewBox: "0 0 120 120",
|
|
1859
|
+
children: [/*#__PURE__*/jsx("circle", {
|
|
1860
|
+
cx: "60",
|
|
1861
|
+
cy: "60",
|
|
1862
|
+
fill: "transparent",
|
|
1863
|
+
r: "50",
|
|
1864
|
+
stroke: "rgba(2, 128, 105, 0.2)",
|
|
1865
|
+
strokeWidth: "4"
|
|
1866
|
+
}), /*#__PURE__*/jsx("circle", {
|
|
1867
|
+
className: "transition-all duration-1000 ease-linear",
|
|
1868
|
+
cx: "60",
|
|
1869
|
+
cy: "60",
|
|
1870
|
+
fill: "transparent",
|
|
1871
|
+
r: "50",
|
|
1872
|
+
stroke: "rgb(2, 128, 105)",
|
|
1873
|
+
strokeDasharray: 2 * Math.PI * 50,
|
|
1874
|
+
strokeLinecap: "round",
|
|
1875
|
+
strokeWidth: "4",
|
|
1876
|
+
strokeDashoffset: 2 * Math.PI * 50 * (countdownTimeLeft / COUNTDOWN_TIME)
|
|
1877
|
+
})]
|
|
1878
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
1879
|
+
className: " text-6xl font-bold",
|
|
1880
|
+
weight: "semibold",
|
|
1881
|
+
children: countdownTimeLeft
|
|
1882
|
+
})]
|
|
1883
|
+
})
|
|
1884
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
1885
|
+
className: "mb-4",
|
|
1859
1886
|
style: "h3",
|
|
1860
1887
|
children: t("neetoMediaRecorder.record.startsIn")
|
|
1861
|
-
}), /*#__PURE__*/jsx(Typography, {
|
|
1862
|
-
className: "neeto-ui-text-4xl neeto-ui-bg-primary-100 neeto-ui-rounded-full flex h-32 w-32 items-center justify-center",
|
|
1863
|
-
weight: "semibold",
|
|
1864
|
-
children: countdownTimeLeft
|
|
1865
1888
|
})]
|
|
1866
1889
|
}), isRecorderStatus(SCREEN_RECORDER_STATUS.recording, SCREEN_RECORDER_STATUS.paused) && /*#__PURE__*/jsx(Timer, {})]
|
|
1867
1890
|
}), /*#__PURE__*/jsx(Controls, {
|