@bigbinary/neeto-media-recorder 2.7.49 → 2.7.50
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.map +1 -1
- package/core.js +62 -49
- package/core.js.map +1 -1
- package/index.js +34 -40
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/utils.js.map +1 -1
- package/v2/index.js +34 -40
- package/v2/index.js.map +1 -1
package/index.js
CHANGED
|
@@ -31,7 +31,7 @@ import Refresh from '@bigbinary/neeto-icons/Refresh';
|
|
|
31
31
|
import CopyToClipboardButton from '@bigbinary/neeto-molecules/CopyToClipboardButton';
|
|
32
32
|
import ProgressBar from '@bigbinary/neetoui/ProgressBar';
|
|
33
33
|
|
|
34
|
-
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s
|
|
34
|
+
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=true===r.prepend?"prepend":"append",d=true===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
35
35
|
|
|
36
36
|
var css = ".nrec-done-button{background-color:rgb(var(--neeto-ui-error-100));padding:8px 12px}.nrec-done-button:hover{box-shadow:0 0 0 3px rgba(var(--neeto-ui-error-500),15%)}body .neeto-ui-modal__wrapper .neeto-ui-btn--style-danger{background:rgb(var(--neeto-ui-error-500))}.nrec-media-upload-progress{margin:0 auto;max-width:480px}.nrec-media-upload-error{color:rgb(var(--neeto-ui-error-500))}.nrec-media-upload-loader{background:#d9d9d9;border-radius:14px;display:inline-block;height:10px;margin:0 auto;max-width:480px;overflow:hidden;position:relative;width:100%}.nrec-media-upload-loader:after{animation:movementLoader 3s linear infinite,barAnimation 1.5s linear infinite;background-color:#fff;background-image:linear-gradient(45deg,#268e6c 25%,#12805c 0,#12805c 50%,#268e6c 0,#268e6c 75%,#12805c 0,#12805c);background-size:1em 1em;border-radius:14px;box-sizing:border-box;content:\"\";height:10px;left:0;position:absolute;top:0;width:230px}@media only screen and (max-width:767px){.nrec-media-upload-loader:after{width:130px}}.nrec-grant-permission-callout{font-size:20px;left:50%;pointer-events:none;position:fixed;top:60vh;transform:translateX(-50%);width:min(640px,100vw - 32px);z-index:2147483000}@keyframes barAnimation{0%{background-position:1em 0}to{background-position:0 0}}@keyframes movementLoader{0%{left:0;transform:translateX(-100%)}to{left:100%;transform:translateX(0)}}";
|
|
37
37
|
n(css,{});
|
|
@@ -50,7 +50,7 @@ function toPrimitive(t, r) {
|
|
|
50
50
|
if ("object" != _typeof$1(t) || !t) return t;
|
|
51
51
|
var e = t[Symbol.toPrimitive];
|
|
52
52
|
if (void 0 !== e) {
|
|
53
|
-
var i = e.call(t, r
|
|
53
|
+
var i = e.call(t, r);
|
|
54
54
|
if ("object" != _typeof$1(i)) return i;
|
|
55
55
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
56
56
|
}
|
|
@@ -65,9 +65,9 @@ function toPropertyKey(t) {
|
|
|
65
65
|
function _defineProperty(e, r, t) {
|
|
66
66
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
67
67
|
value: t,
|
|
68
|
-
enumerable:
|
|
69
|
-
configurable:
|
|
70
|
-
writable:
|
|
68
|
+
enumerable: true,
|
|
69
|
+
configurable: true,
|
|
70
|
+
writable: true
|
|
71
71
|
}) : e[r] = t, e;
|
|
72
72
|
}
|
|
73
73
|
|
|
@@ -109,12 +109,12 @@ function _iterableToArrayLimit(r, l) {
|
|
|
109
109
|
i,
|
|
110
110
|
u,
|
|
111
111
|
a = [],
|
|
112
|
-
f =
|
|
113
|
-
o =
|
|
112
|
+
f = true,
|
|
113
|
+
o = false;
|
|
114
114
|
try {
|
|
115
115
|
if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
116
116
|
} catch (r) {
|
|
117
|
-
o =
|
|
117
|
+
o = true, n = r;
|
|
118
118
|
} finally {
|
|
119
119
|
try {
|
|
120
120
|
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
@@ -191,9 +191,9 @@ var _typeofExports = _typeof.exports;
|
|
|
191
191
|
function define(t, e, r) {
|
|
192
192
|
return Object.defineProperty(t, e, {
|
|
193
193
|
value: r,
|
|
194
|
-
enumerable:
|
|
195
|
-
configurable:
|
|
196
|
-
writable:
|
|
194
|
+
enumerable: true,
|
|
195
|
+
configurable: true,
|
|
196
|
+
writable: true
|
|
197
197
|
}), t[e];
|
|
198
198
|
}
|
|
199
199
|
try {
|
|
@@ -286,7 +286,7 @@ var _typeofExports = _typeof.exports;
|
|
|
286
286
|
if ("throw" === i) throw a;
|
|
287
287
|
return {
|
|
288
288
|
value: t,
|
|
289
|
-
done:
|
|
289
|
+
done: true
|
|
290
290
|
};
|
|
291
291
|
}
|
|
292
292
|
for (n.method = i, n.arg = a;;) {
|
|
@@ -337,7 +337,7 @@ var _typeofExports = _typeof.exports;
|
|
|
337
337
|
function Context(t) {
|
|
338
338
|
this.tryEntries = [{
|
|
339
339
|
tryLoc: "root"
|
|
340
|
-
}], t.forEach(pushTryEntry, this), this.reset(
|
|
340
|
+
}], t.forEach(pushTryEntry, this), this.reset(true);
|
|
341
341
|
}
|
|
342
342
|
function values(e) {
|
|
343
343
|
if (e || "" === e) {
|
|
@@ -347,8 +347,8 @@ var _typeofExports = _typeof.exports;
|
|
|
347
347
|
if (!isNaN(e.length)) {
|
|
348
348
|
var o = -1,
|
|
349
349
|
i = function next() {
|
|
350
|
-
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done =
|
|
351
|
-
return next.value = t, next.done =
|
|
350
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = false, next;
|
|
351
|
+
return next.value = t, next.done = true, next;
|
|
352
352
|
};
|
|
353
353
|
return i.next = i;
|
|
354
354
|
}
|
|
@@ -357,10 +357,10 @@ var _typeofExports = _typeof.exports;
|
|
|
357
357
|
}
|
|
358
358
|
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
359
359
|
value: GeneratorFunctionPrototype,
|
|
360
|
-
configurable:
|
|
360
|
+
configurable: true
|
|
361
361
|
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
362
362
|
value: GeneratorFunction,
|
|
363
|
-
configurable:
|
|
363
|
+
configurable: true
|
|
364
364
|
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
365
365
|
var e = "function" == typeof t && t.constructor;
|
|
366
366
|
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
@@ -389,17 +389,17 @@ var _typeofExports = _typeof.exports;
|
|
|
389
389
|
return r.reverse(), function next() {
|
|
390
390
|
for (; r.length;) {
|
|
391
391
|
var t = r.pop();
|
|
392
|
-
if (t in e) return next.value = t, next.done =
|
|
392
|
+
if (t in e) return next.value = t, next.done = false, next;
|
|
393
393
|
}
|
|
394
|
-
return next.done =
|
|
394
|
+
return next.done = true, next;
|
|
395
395
|
};
|
|
396
396
|
}, e.values = values, Context.prototype = {
|
|
397
397
|
constructor: Context,
|
|
398
398
|
reset: function reset(e) {
|
|
399
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done =
|
|
399
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = false, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
|
|
400
400
|
},
|
|
401
401
|
stop: function stop() {
|
|
402
|
-
this.done =
|
|
402
|
+
this.done = true;
|
|
403
403
|
var t = this.tryEntries[0].completion;
|
|
404
404
|
if ("throw" === t.type) throw t.arg;
|
|
405
405
|
return this.rval;
|
|
@@ -418,10 +418,10 @@ var _typeofExports = _typeof.exports;
|
|
|
418
418
|
var c = n.call(i, "catchLoc"),
|
|
419
419
|
u = n.call(i, "finallyLoc");
|
|
420
420
|
if (c && u) {
|
|
421
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc,
|
|
421
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, true);
|
|
422
422
|
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
423
423
|
} else if (c) {
|
|
424
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc,
|
|
424
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, true);
|
|
425
425
|
} else {
|
|
426
426
|
if (!u) throw Error("try statement without catch or finally");
|
|
427
427
|
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
@@ -501,10 +501,6 @@ var ONE_SECOND_IN_MILLISECONDS = 1000;
|
|
|
501
501
|
var ONE_MINUTE_IN_MILLISECONDS = 60 * ONE_SECOND_IN_MILLISECONDS;
|
|
502
502
|
var ONE_HOUR_IN_MILLISECONDS = 60 * ONE_MINUTE_IN_MILLISECONDS;
|
|
503
503
|
var UPLOAD_STATUS = {
|
|
504
|
-
uploading: "uploading",
|
|
505
|
-
completed: "completed",
|
|
506
|
-
aborting: "aborting",
|
|
507
|
-
insufficient_data: "insufficient_data",
|
|
508
504
|
error: "error"
|
|
509
505
|
};
|
|
510
506
|
var TOTAL_RETRIES = 15;
|
|
@@ -512,9 +508,7 @@ var INITIAL_RETRY_DELAY = 4000;
|
|
|
512
508
|
var MAX_RETRY_DELAY = 16000;
|
|
513
509
|
var DEFAULT_RETRY_CONFIG = {
|
|
514
510
|
retries: TOTAL_RETRIES,
|
|
515
|
-
retryDelay: INITIAL_RETRY_DELAY
|
|
516
|
-
retryableStatuses: []
|
|
517
|
-
};
|
|
511
|
+
retryDelay: INITIAL_RETRY_DELAY};
|
|
518
512
|
var HAS_CHROME_NAMESPACE = (typeof chrome === "undefined" ? "undefined" : _typeof$1(chrome)) === "object";
|
|
519
513
|
var IS_EXTENSION = HAS_CHROME_NAMESPACE && isNotNil(chrome.extension);
|
|
520
514
|
var IS_SAFARI = platform.name === "Safari";
|
|
@@ -829,7 +823,7 @@ var copyRecordingLinkToClipboardOnStop = function copyRecordingLinkToClipboardOn
|
|
|
829
823
|
|
|
830
824
|
function _createClass(e, r, t) {
|
|
831
825
|
return Object.defineProperty(e, "prototype", {
|
|
832
|
-
writable:
|
|
826
|
+
writable: false
|
|
833
827
|
}), e;
|
|
834
828
|
}
|
|
835
829
|
|
|
@@ -848,11 +842,11 @@ function _inherits(t, e) {
|
|
|
848
842
|
t.prototype = Object.create(e && e.prototype, {
|
|
849
843
|
constructor: {
|
|
850
844
|
value: t,
|
|
851
|
-
writable:
|
|
852
|
-
configurable:
|
|
845
|
+
writable: true,
|
|
846
|
+
configurable: true
|
|
853
847
|
}
|
|
854
848
|
}), Object.defineProperty(t, "prototype", {
|
|
855
|
-
writable:
|
|
849
|
+
writable: false
|
|
856
850
|
}), e && _setPrototypeOf(t, e);
|
|
857
851
|
}
|
|
858
852
|
|
|
@@ -913,9 +907,9 @@ function _wrapNativeSuper(t) {
|
|
|
913
907
|
return Wrapper.prototype = Object.create(t.prototype, {
|
|
914
908
|
constructor: {
|
|
915
909
|
value: Wrapper,
|
|
916
|
-
enumerable:
|
|
917
|
-
writable:
|
|
918
|
-
configurable:
|
|
910
|
+
enumerable: false,
|
|
911
|
+
writable: true,
|
|
912
|
+
configurable: true
|
|
919
913
|
}
|
|
920
914
|
}), _setPrototypeOf(Wrapper, t);
|
|
921
915
|
}, _wrapNativeSuper(t);
|
|
@@ -1019,7 +1013,7 @@ var buildRetryableApi = function buildRetryableApi(apiConnector) {
|
|
|
1019
1013
|
};
|
|
1020
1014
|
|
|
1021
1015
|
function ownKeys$2(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; }
|
|
1022
|
-
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t),
|
|
1016
|
+
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1023
1017
|
var baseUrl = "/api/v1/recordings";
|
|
1024
1018
|
var create = function create() {
|
|
1025
1019
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
@@ -1037,7 +1031,7 @@ var recordingsApi = {
|
|
|
1037
1031
|
};
|
|
1038
1032
|
|
|
1039
1033
|
function ownKeys$1(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; }
|
|
1040
|
-
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t),
|
|
1034
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1041
1035
|
var useCreateRecording = function useCreateRecording(options) {
|
|
1042
1036
|
return useMutation(_objectSpread$1({
|
|
1043
1037
|
mutationFn: function mutationFn(payload) {
|
|
@@ -1341,7 +1335,7 @@ var _excluded = ["size"],
|
|
|
1341
1335
|
_excluded2 = ["size"],
|
|
1342
1336
|
_excluded3 = ["size"];
|
|
1343
1337
|
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; }
|
|
1344
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t),
|
|
1338
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).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; }
|
|
1345
1339
|
var PlayIcon = function PlayIcon(_ref) {
|
|
1346
1340
|
var _ref$size = _ref.size,
|
|
1347
1341
|
size = _ref$size === void 0 ? 24 : _ref$size,
|