@bigbinary/neeto-media-recorder 2.7.36 → 2.7.37
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 +1 -0
- package/constants.js.map +1 -1
- package/core.js +26 -0
- package/core.js.map +1 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
package/constants.js
CHANGED
package/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["node_modules/@babel/runtime/helpers/esm/typeof.js","src/constants.js"],"sourcesContent":["function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };","import platform from \"platform\";\nimport { isNotNil } from \"ramda\";\n\n// https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList\nexport const RETRYABLE_ERRORS = [500, 503];\n\nexport const ONE_SECOND_IN_MILLISECONDS = 1000;\nexport const HALF_A_SECOND_IN_MILLISECONDS = 500;\nexport const TWO_HUNDRED_MILLISECONDS = 200;\n\nexport const ONE_MINUTE_IN_MILLISECONDS = 60 * ONE_SECOND_IN_MILLISECONDS;\nexport const ONE_HOUR_IN_MILLISECONDS = 60 * ONE_MINUTE_IN_MILLISECONDS;\n\nexport const ONE_SECOND = 1;\n\nexport const COUNTDOWN_TIME = 3;\n\nexport const UPLOAD_EVENT = {\n onComplete: \"onComplete\",\n onError: \"onError\",\n onProgress: \"onProgress\",\n};\n\nexport const UPLOAD_STATUS = {\n uploading: \"uploading\",\n completed: \"completed\",\n aborting: \"aborting\",\n insufficient_data: \"insufficient_data\",\n error: \"error\",\n};\n\nexport const SCREEN_RECORDER_STATUS = {\n media_aborted: \"media_aborted\",\n permission_denied: \"permission_denied\",\n no_specified_media_found: \"no_specified_media_found\",\n media_in_use: \"media_in_use\",\n invalid_media_constraints: \"invalid_media_constraints\",\n no_chrome_flags_set: \"no_chrome_flags_set\",\n recorder_error: \"recorder_error\",\n idle: \"idle\",\n acquiring_media: \"acquiring_media\",\n media_acquired: \"media_acquired\",\n restarting: \"restarting\",\n recording: \"recording\",\n stopping: \"stopping\",\n stopped: \"stopped\",\n paused: \"paused\",\n};\n\nexport const SCREEN_RECORDER_ERROR = {\n MicPermissionDenied: \"mic_permission_denied\",\n AbortError: \"media_aborted\",\n NotAllowedError: \"permission_denied\",\n NotFoundError: \"no_specified_media_found\",\n NotReadableError: \"media_in_use\",\n OverconstrainedError: \"invalid_media_constraints\",\n TypeError: \"no_chrome_flags_set\",\n None: \"\",\n NoRecorder: \"recorder_error\",\n UnSupportedBrowser: \"unsupported_browser\",\n FailedToStart: \"failed_to_start\",\n CreateRecordingError: \"create_recording_error\",\n InsufficientData: \"insufficient_data\",\n};\n\nexport const SCREEN_RECORDER_EVENT = {\n onStart: \"onStart\",\n onStop: \"onStop\",\n onDiscard: \"onDiscard\",\n onDataAvailable: \"onDataAvailable\",\n onDiscardDuringCountdown: \"onDiscardDuringCountdown\",\n onRestart: \"onRestart\",\n onReUpload: \"onReUpload\",\n onReUploadFromDisk: \"onReUploadFromDisk\",\n onPause: \"onPause\",\n onResume: \"onResume\",\n onCountdownStart: \"onCountdownStart\",\n onCountdown: \"onCountDown\",\n onCountdownEnd: \"onCountdownEnd\",\n onShareSelected: \"onShareSelected\",\n};\n\nexport const TOTAL_RETRIES = 15;\nexport const ABORT_UPLOAD_RETRIES = 2;\nexport const INITIAL_RETRY_DELAY = 4000;\nexport const MAX_RETRY_DELAY = 16000;\n\nexport const DEFAULT_RETRY_CONFIG = {\n retries: TOTAL_RETRIES,\n retryDelay: INITIAL_RETRY_DELAY,\n retryableStatuses: [],\n};\n\n// No need to localize this since it will only be used in the code\n// eslint-disable-next-line @bigbinary/neeto/hard-coded-strings-should-be-localized\nexport const NETWORK_ERROR = \"Network Error\";\nexport const TIMEOUT_ERROR = \"ECONNABORTED\";\n\nexport const HAS_CHROME_NAMESPACE = typeof chrome === \"object\";\n\nexport const IS_EXTENSION = HAS_CHROME_NAMESPACE && isNotNil(chrome.extension);\n\nexport const IS_SAFARI = platform.name === \"Safari\";\n\nexport const IS_SAFARI_EXTENSION = IS_SAFARI && IS_EXTENSION;\n\nexport const PERMISSIONS_HELP_DOC =\n \"https://neetorecordhelp.neetokb.com/p/a-10efcfd7\";\n\n// Firefox refuses to start a MediaRecorder on a stream that has both audio and\n// video tracks unless the MIME string declares the audio codec too. Chromium\n// and Safari accept the video-only form and silently pick Opus/AAC. We keep\n// both variants and always prefer the codec-complete ones in\n// getSupportedMimeType so a single code path works across browsers.\nexport const MIME_TYPE = {\n mp4: \"video/mp4\",\n webmH264Opus: \"video/webm;codecs=h264,opus\",\n webmH264: \"video/webm;codecs=h264\",\n webmVp9Opus: \"video/webm;codecs=vp9,opus\",\n webmVp9: \"video/webm;codecs=vp9\",\n webmVp8Opus: \"video/webm;codecs=vp8,opus\",\n webmVp8: \"video/webm;codecs=vp8\",\n webm: \"video/webm\",\n};\n\nexport const START_RECORDING_SOUND =\n \"https://neeto-record-static-assets.s3.amazonaws.com/recording-start-sound-2.mp3\";\n\nexport const COUNTDOWN_TICK_SOUND =\n \"https://neeto-record-static-assets.s3.us-east-1.amazonaws.com/recording-tick-sound.mp3\";\n\nexport const STOP_RECORDING_DUE_TO_LIMIT_REACHED_SOUND =\n \"https://neeto-record-static-assets.s3.amazonaws.com/recording-end-sound.mp3\";\n\nexport const RECORDING_LIMIT_REACHED_WARNING_SOUND =\n \"https://neeto-record-static-assets.s3.amazonaws.com/recording-warning-sound.mp3\";\n\nexport const RECORDING_TIME_LIMIT_FREE_PLAN = 15 * ONE_MINUTE_IN_MILLISECONDS; // 15 minutes\nexport const RECORDING_TIME_LIMIT_PRO_PLAN = 2 * ONE_HOUR_IN_MILLISECONDS; // 2 hours\n\nexport const MIC_NOT_WORKING_ALERT_TIME = 30;\nexport const MIC_NOT_WORKING_SILENCE_TIMEOUT =\n MIC_NOT_WORKING_ALERT_TIME * 1000;\n"],"names":["RETRYABLE_ERRORS","ONE_SECOND_IN_MILLISECONDS","HALF_A_SECOND_IN_MILLISECONDS","TWO_HUNDRED_MILLISECONDS","ONE_MINUTE_IN_MILLISECONDS","ONE_HOUR_IN_MILLISECONDS","ONE_SECOND","COUNTDOWN_TIME","UPLOAD_EVENT","onComplete","onError","onProgress","UPLOAD_STATUS","uploading","completed","aborting","insufficient_data","error","SCREEN_RECORDER_STATUS","media_aborted","permission_denied","no_specified_media_found","media_in_use","invalid_media_constraints","no_chrome_flags_set","recorder_error","idle","acquiring_media","media_acquired","restarting","recording","stopping","stopped","paused","SCREEN_RECORDER_ERROR","MicPermissionDenied","AbortError","NotAllowedError","NotFoundError","NotReadableError","OverconstrainedError","TypeError","None","NoRecorder","UnSupportedBrowser","FailedToStart","CreateRecordingError","InsufficientData","SCREEN_RECORDER_EVENT","onStart","onStop","onDiscard","onDataAvailable","onDiscardDuringCountdown","onRestart","onReUpload","onReUploadFromDisk","onPause","onResume","onCountdownStart","onCountdown","onCountdownEnd","onShareSelected","TOTAL_RETRIES","ABORT_UPLOAD_RETRIES","INITIAL_RETRY_DELAY","MAX_RETRY_DELAY","DEFAULT_RETRY_CONFIG","retries","retryDelay","retryableStatuses","NETWORK_ERROR","TIMEOUT_ERROR","HAS_CHROME_NAMESPACE","chrome","_typeof","IS_EXTENSION","isNotNil","extension","IS_SAFARI","platform","name","IS_SAFARI_EXTENSION","PERMISSIONS_HELP_DOC","MIME_TYPE","mp4","webmH264Opus","webmH264","webmVp9Opus","webmVp9","webmVp8Opus","webmVp8","webm","START_RECORDING_SOUND","COUNTDOWN_TICK_SOUND","STOP_RECORDING_DUE_TO_LIMIT_REACHED_SOUND","RECORDING_LIMIT_REACHED_WARNING_SOUND","RECORDING_TIME_LIMIT_FREE_PLAN","RECORDING_TIME_LI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,uBAAuB;AAChCC,EAAAA,WAAW,EAAE,4BAA4B;AACzCC,EAAAA,OAAO,EAAE,uBAAuB;AAChCC,EAAAA,IAAI,EAAE,YAAA;AACR,EAAC;AAEM,IAAMC,qBAAqB,GAChC,kFAAiF;AAE5E,IAAMC,oBAAoB,GAC/B,yFAAwF;AAEnF,IAAMC,yCAAyC,GACpD,8EAA6E;AAExE,IAAMC,qCAAqC,GAChD,kFAAiF;IAEtEC,8BAA8B,GAAG,EAAE,GAAG7F,2BAA2B;IACjE8F,6BAA6B,GAAG,CAAC,GAAG7F,yBAAyB;;AAEnE,IAAM8F,0BAA0B,GAAG,GAAE;AAC/BC,IAAAA,+BAA+B,GAC1CD,0BAA0B,GAAG;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["node_modules/@babel/runtime/helpers/esm/typeof.js","src/constants.js"],"sourcesContent":["function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };","import platform from \"platform\";\nimport { isNotNil } from \"ramda\";\n\n// https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ErrorCodeList\nexport const RETRYABLE_ERRORS = [500, 503];\n\nexport const ONE_SECOND_IN_MILLISECONDS = 1000;\nexport const HALF_A_SECOND_IN_MILLISECONDS = 500;\nexport const TWO_HUNDRED_MILLISECONDS = 200;\n\nexport const ONE_MINUTE_IN_MILLISECONDS = 60 * ONE_SECOND_IN_MILLISECONDS;\nexport const ONE_HOUR_IN_MILLISECONDS = 60 * ONE_MINUTE_IN_MILLISECONDS;\n\nexport const ONE_SECOND = 1;\n\nexport const COUNTDOWN_TIME = 3;\n\nexport const UPLOAD_EVENT = {\n onComplete: \"onComplete\",\n onError: \"onError\",\n onProgress: \"onProgress\",\n};\n\nexport const UPLOAD_STATUS = {\n uploading: \"uploading\",\n completed: \"completed\",\n aborting: \"aborting\",\n insufficient_data: \"insufficient_data\",\n error: \"error\",\n};\n\nexport const SCREEN_RECORDER_STATUS = {\n media_aborted: \"media_aborted\",\n permission_denied: \"permission_denied\",\n no_specified_media_found: \"no_specified_media_found\",\n media_in_use: \"media_in_use\",\n invalid_media_constraints: \"invalid_media_constraints\",\n no_chrome_flags_set: \"no_chrome_flags_set\",\n recorder_error: \"recorder_error\",\n idle: \"idle\",\n acquiring_media: \"acquiring_media\",\n media_acquired: \"media_acquired\",\n restarting: \"restarting\",\n recording: \"recording\",\n stopping: \"stopping\",\n stopped: \"stopped\",\n paused: \"paused\",\n};\n\nexport const SCREEN_RECORDER_ERROR = {\n MicPermissionDenied: \"mic_permission_denied\",\n AbortError: \"media_aborted\",\n NotAllowedError: \"permission_denied\",\n NotFoundError: \"no_specified_media_found\",\n NotReadableError: \"media_in_use\",\n OverconstrainedError: \"invalid_media_constraints\",\n TypeError: \"no_chrome_flags_set\",\n None: \"\",\n NoRecorder: \"recorder_error\",\n UnSupportedBrowser: \"unsupported_browser\",\n FailedToStart: \"failed_to_start\",\n CreateRecordingError: \"create_recording_error\",\n InsufficientData: \"insufficient_data\",\n};\n\nexport const SCREEN_RECORDER_EVENT = {\n onStart: \"onStart\",\n onStop: \"onStop\",\n onDiscard: \"onDiscard\",\n onDataAvailable: \"onDataAvailable\",\n onDiscardDuringCountdown: \"onDiscardDuringCountdown\",\n onRestart: \"onRestart\",\n onReUpload: \"onReUpload\",\n onReUploadFromDisk: \"onReUploadFromDisk\",\n onPause: \"onPause\",\n onResume: \"onResume\",\n onCountdownStart: \"onCountdownStart\",\n onCountdown: \"onCountDown\",\n onCountdownEnd: \"onCountdownEnd\",\n onCountdownSkip: \"onCountdownSkip\",\n onShareSelected: \"onShareSelected\",\n};\n\nexport const TOTAL_RETRIES = 15;\nexport const ABORT_UPLOAD_RETRIES = 2;\nexport const INITIAL_RETRY_DELAY = 4000;\nexport const MAX_RETRY_DELAY = 16000;\n\nexport const DEFAULT_RETRY_CONFIG = {\n retries: TOTAL_RETRIES,\n retryDelay: INITIAL_RETRY_DELAY,\n retryableStatuses: [],\n};\n\n// No need to localize this since it will only be used in the code\n// eslint-disable-next-line @bigbinary/neeto/hard-coded-strings-should-be-localized\nexport const NETWORK_ERROR = \"Network Error\";\nexport const TIMEOUT_ERROR = \"ECONNABORTED\";\n\nexport const HAS_CHROME_NAMESPACE = typeof chrome === \"object\";\n\nexport const IS_EXTENSION = HAS_CHROME_NAMESPACE && isNotNil(chrome.extension);\n\nexport const IS_SAFARI = platform.name === \"Safari\";\n\nexport const IS_SAFARI_EXTENSION = IS_SAFARI && IS_EXTENSION;\n\nexport const PERMISSIONS_HELP_DOC =\n \"https://neetorecordhelp.neetokb.com/p/a-10efcfd7\";\n\n// Firefox refuses to start a MediaRecorder on a stream that has both audio and\n// video tracks unless the MIME string declares the audio codec too. Chromium\n// and Safari accept the video-only form and silently pick Opus/AAC. We keep\n// both variants and always prefer the codec-complete ones in\n// getSupportedMimeType so a single code path works across browsers.\nexport const MIME_TYPE = {\n mp4: \"video/mp4\",\n webmH264Opus: \"video/webm;codecs=h264,opus\",\n webmH264: \"video/webm;codecs=h264\",\n webmVp9Opus: \"video/webm;codecs=vp9,opus\",\n webmVp9: \"video/webm;codecs=vp9\",\n webmVp8Opus: \"video/webm;codecs=vp8,opus\",\n webmVp8: \"video/webm;codecs=vp8\",\n webm: \"video/webm\",\n};\n\nexport const START_RECORDING_SOUND =\n \"https://neeto-record-static-assets.s3.amazonaws.com/recording-start-sound-2.mp3\";\n\nexport const COUNTDOWN_TICK_SOUND =\n \"https://neeto-record-static-assets.s3.us-east-1.amazonaws.com/recording-tick-sound.mp3\";\n\nexport const STOP_RECORDING_DUE_TO_LIMIT_REACHED_SOUND =\n \"https://neeto-record-static-assets.s3.amazonaws.com/recording-end-sound.mp3\";\n\nexport const RECORDING_LIMIT_REACHED_WARNING_SOUND =\n \"https://neeto-record-static-assets.s3.amazonaws.com/recording-warning-sound.mp3\";\n\nexport const RECORDING_TIME_LIMIT_FREE_PLAN = 15 * ONE_MINUTE_IN_MILLISECONDS; // 15 minutes\nexport const RECORDING_TIME_LIMIT_PRO_PLAN = 2 * ONE_HOUR_IN_MILLISECONDS; // 2 hours\n\nexport const MIC_NOT_WORKING_ALERT_TIME = 30;\nexport const MIC_NOT_WORKING_SILENCE_TIMEOUT =\n MIC_NOT_WORKING_ALERT_TIME * 1000;\n"],"names":["RETRYABLE_ERRORS","ONE_SECOND_IN_MILLISECONDS","HALF_A_SECOND_IN_MILLISECONDS","TWO_HUNDRED_MILLISECONDS","ONE_MINUTE_IN_MILLISECONDS","ONE_HOUR_IN_MILLISECONDS","ONE_SECOND","COUNTDOWN_TIME","UPLOAD_EVENT","onComplete","onError","onProgress","UPLOAD_STATUS","uploading","completed","aborting","insufficient_data","error","SCREEN_RECORDER_STATUS","media_aborted","permission_denied","no_specified_media_found","media_in_use","invalid_media_constraints","no_chrome_flags_set","recorder_error","idle","acquiring_media","media_acquired","restarting","recording","stopping","stopped","paused","SCREEN_RECORDER_ERROR","MicPermissionDenied","AbortError","NotAllowedError","NotFoundError","NotReadableError","OverconstrainedError","TypeError","None","NoRecorder","UnSupportedBrowser","FailedToStart","CreateRecordingError","InsufficientData","SCREEN_RECORDER_EVENT","onStart","onStop","onDiscard","onDataAvailable","onDiscardDuringCountdown","onRestart","onReUpload","onReUploadFromDisk","onPause","onResume","onCountdownStart","onCountdown","onCountdownEnd","onCountdownSkip","onShareSelected","TOTAL_RETRIES","ABORT_UPLOAD_RETRIES","INITIAL_RETRY_DELAY","MAX_RETRY_DELAY","DEFAULT_RETRY_CONFIG","retries","retryDelay","retryableStatuses","NETWORK_ERROR","TIMEOUT_ERROR","HAS_CHROME_NAMESPACE","chrome","_typeof","IS_EXTENSION","isNotNil","extension","IS_SAFARI","platform","name","IS_SAFARI_EXTENSION","PERMISSIONS_HELP_DOC","MIME_TYPE","mp4","webmH264Opus","webmH264","webmVp9Opus","webmVp9","webmVp8Opus","webmVp8","webm","START_RECORDING_SOUND","COUNTDOWN_TICK_SOUND","STOP_RECORDING_DUE_TO_LIMIT_REACHED_SOUND","RECORDING_LIMIT_REACHED_WARNING_SOUND","RECORDING_TIME_LIMIT_FREE_PLAN","RECORDING_TIME_LIMIT_PRO_PLAN","MIC_NOT_WORKING_ALERT_TIME","MIC_NOT_WORKING_SILENCE_TIMEOUT"],"mappings":";;;AAAA,SAAS,OAAO,CAAC,CAAC,EAAE;AACpB,EAAE,yBAAyB,CAAC;AAC5B;AACA,EAAE,OAAO,OAAO,GAAG,UAAU,IAAI,OAAO,MAAM,IAAI,QAAQ,IAAI,OAAO,MAAM,CAAC,QAAQ,GAAG,UAAU,CAAC,EAAE;AACpG,IAAI,OAAO,OAAO,CAAC,CAAC;AACpB,GAAG,GAAG,UAAU,CAAC,EAAE;AACnB,IAAI,OAAO,CAAC,IAAI,UAAU,IAAI,OAAO,MAAM,IAAI,CAAC,CAAC,WAAW,KAAK,MAAM,IAAI,CAAC,KAAK,MAAM,CAAC,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC,CAAC;AACxH,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;AAChB;;ACLA;IACaA,gBAAgB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAC;AAEnC,IAAMC,0BAA0B,GAAG,KAAI;AACvC,IAAMC,6BAA6B,GAAG,IAAG;AACzC,IAAMC,wBAAwB,GAAG,IAAG;AAE9BC,IAAAA,0BAA0B,GAAG,EAAE,GAAGH,2BAA0B;AAC5DI,IAAAA,wBAAwB,GAAG,EAAE,GAAGD,2BAA0B;AAEhE,IAAME,UAAU,GAAG,EAAC;AAEpB,IAAMC,cAAc,GAAG,EAAC;AAExB,IAAMC,YAAY,GAAG;AAC1BC,EAAAA,UAAU,EAAE,YAAY;AACxBC,EAAAA,OAAO,EAAE,SAAS;AAClBC,E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SAAS,IAAIH,aAAY;AAErD,IAAMO,oBAAoB,GAC/B,mDAAkD;;AAEpD;AACA;AACA;AACA;AACA;AACO,IAAMC,SAAS,GAAG;AACvBC,EAAAA,GAAG,EAAE,WAAW;AAChBC,EAAAA,YAAY,EAAE,6BAA6B;AAC3CC,EAAAA,QAAQ,EAAE,wBAAwB;AAClCC,EAAAA,WAAW,EAAE,4BAA4B;AACzCC,EAAAA,OAAO,EAAE,uBAAuB;AAChCC,EAAAA,WAAW,EAAE,4BAA4B;AACzCC,EAAAA,OAAO,EAAE,uBAAuB;AAChCC,EAAAA,IAAI,EAAE,YAAA;AACR,EAAC;AAEM,IAAMC,qBAAqB,GAChC,kFAAiF;AAE5E,IAAMC,oBAAoB,GAC/B,yFAAwF;AAEnF,IAAMC,yCAAyC,GACpD,8EAA6E;AAExE,IAAMC,qCAAqC,GAChD,kFAAiF;IAEtEC,8BAA8B,GAAG,EAAE,GAAG9F,2BAA2B;IACjE+F,6BAA6B,GAAG,CAAC,GAAG9F,yBAAyB;;AAEnE,IAAM+F,0BAA0B,GAAG,GAAE;AAC/BC,IAAAA,+BAA+B,GAC1CD,0BAA0B,GAAG;;;;","x_google_ignoreList":[0]}
|
package/core.js
CHANGED
|
@@ -600,6 +600,7 @@ var SCREEN_RECORDER_EVENT = {
|
|
|
600
600
|
onCountdownStart: "onCountdownStart",
|
|
601
601
|
onCountdown: "onCountDown",
|
|
602
602
|
onCountdownEnd: "onCountdownEnd",
|
|
603
|
+
onCountdownSkip: "onCountdownSkip",
|
|
603
604
|
onShareSelected: "onShareSelected"
|
|
604
605
|
};
|
|
605
606
|
var TOTAL_RETRIES = 15;
|
|
@@ -2117,6 +2118,26 @@ var ScreenRecorder = /*#__PURE__*/function () {
|
|
|
2117
2118
|
_classPrivateFieldGet(_this, _stopAllStreams).call(_this);
|
|
2118
2119
|
_classPrivateFieldGet(_this, _stopTimer).call(_this);
|
|
2119
2120
|
});
|
|
2121
|
+
_defineProperty(this, "skipCountdown", function () {
|
|
2122
|
+
if (!_classPrivateFieldGet(_this, _countdownTimerId)) {
|
|
2123
|
+
_classPrivateFieldGet(_this, _logger).warn("skipCountdown -> ignored, no countdown running", _classPrivateFieldGet(_this, _summarizeRecorderState).call(_this));
|
|
2124
|
+
return;
|
|
2125
|
+
}
|
|
2126
|
+
_classPrivateFieldGet(_this, _logger).info("skipCountdown", _classPrivateFieldGet(_this, _summarizeRecorderState).call(_this));
|
|
2127
|
+
clearInterval(_classPrivateFieldGet(_this, _countdownTimerId));
|
|
2128
|
+
_classPrivateFieldSet(_this, _countdownTimerId, null);
|
|
2129
|
+
_classPrivateFieldGet(_this, _fireCallbacks).call(_this, SCREEN_RECORDER_EVENT.onCountdown, [0]);
|
|
2130
|
+
_classPrivateFieldGet(_this, _fireCallbacks).call(_this, SCREEN_RECORDER_EVENT.onCountdownSkip);
|
|
2131
|
+
// onCountdownEnd is the canonical "countdown phase finished" hook —
|
|
2132
|
+
// listeners that just want to know the count-in is over shouldn't have
|
|
2133
|
+
// to subscribe to onCountdownSkip too.
|
|
2134
|
+
_classPrivateFieldGet(_this, _fireCallbacks).call(_this, SCREEN_RECORDER_EVENT.onCountdownEnd);
|
|
2135
|
+
_classPrivateFieldGet(_this, _store).setState({
|
|
2136
|
+
countdownTimeLeft: 0,
|
|
2137
|
+
status: SCREEN_RECORDER_STATUS.recording
|
|
2138
|
+
});
|
|
2139
|
+
_classPrivateFieldGet(_this, _startMediaRecorder).call(_this);
|
|
2140
|
+
});
|
|
2120
2141
|
_defineProperty(this, "pauseRecording", function () {
|
|
2121
2142
|
var _classPrivateFieldGet6;
|
|
2122
2143
|
if (((_classPrivateFieldGet6 = _classPrivateFieldGet(_this, _mediaRecorder)) === null || _classPrivateFieldGet6 === void 0 ? void 0 : _classPrivateFieldGet6.state) === "recording") {
|
|
@@ -2842,6 +2863,11 @@ var ScreenRecorder = /*#__PURE__*/function () {
|
|
|
2842
2863
|
set: function set(value) {
|
|
2843
2864
|
_classPrivateFieldSet(this, _videoStream, value);
|
|
2844
2865
|
}
|
|
2866
|
+
|
|
2867
|
+
// Skip the in-flight countdown and start the actual recording immediately.
|
|
2868
|
+
// The chime is suppressed (vs. natural completion which plays it) since the
|
|
2869
|
+
// user explicitly opted out of the count-in. Listeners hook onCountdownSkip
|
|
2870
|
+
// to clean up countdown-only side effects like scheduled beeps.
|
|
2845
2871
|
}]);
|
|
2846
2872
|
return ScreenRecorder;
|
|
2847
2873
|
}();
|