@eluvio/elv-client-js 4.0.108 → 4.0.109
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/dist/ElvClient-min.js +15 -14
- package/dist/ElvClient-node-min.js +14 -13
- package/dist/ElvFrameClient-min.js +10 -10
- package/dist/ElvPermissionsClient-min.js +9 -9
- package/dist/ElvWalletClient-min.js +15 -14
- package/dist/ElvWalletClient-node-min.js +14 -13
- package/dist/src/AuthorizationClient.js +9 -12
- package/dist/src/ContentObjectAudit.js +3 -3
- package/dist/src/ContentObjectVerification.js +3 -3
- package/dist/src/Crypto.js +2 -2
- package/dist/src/ElvClient.js +47 -28
- package/dist/src/ElvWallet.js +7 -5
- package/dist/src/EthClient.js +8 -9
- package/dist/src/FrameClient.js +8 -9
- package/dist/src/HttpClient.js +1 -2
- package/dist/src/Id.js +1 -2
- package/dist/src/PermissionsClient.js +31 -19
- package/dist/src/RemoteSigner.js +6 -8
- package/dist/src/UserProfileClient.js +35 -20
- package/dist/src/Utils.js +2 -3
- package/dist/src/client/ABRPublishing.js +2 -2
- package/dist/src/client/AccessGroups.js +2 -2
- package/dist/src/client/ContentAccess.js +2 -3
- package/dist/src/client/ContentManagement.js +3 -3
- package/dist/src/client/Contracts.js +2 -2
- package/dist/src/client/Files.js +2 -2
- package/dist/src/client/LiveConf.js +3 -5
- package/dist/src/client/LiveStream.js +43 -45
- package/dist/src/client/NFT.js +2 -2
- package/dist/src/walletClient/ClientMethods.js +2 -2
- package/dist/src/walletClient/Profile.js +2 -2
- package/dist/src/walletClient/Utils.js +2 -2
- package/dist/src/walletClient/index.js +17 -14
- package/package.json +1 -1
- package/src/client/LiveStream.js +3 -1
|
@@ -2,8 +2,8 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
2
2
|
var _defineProperty = require("@babel/runtime/helpers/defineProperty");
|
|
3
3
|
var _regeneratorRuntime = require("@babel/runtime/regenerator");
|
|
4
4
|
var _asyncToGenerator = require("@babel/runtime/helpers/asyncToGenerator");
|
|
5
|
-
function ownKeys(
|
|
6
|
-
function _objectSpread(
|
|
5
|
+
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; }
|
|
6
|
+
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; }
|
|
7
7
|
/**
|
|
8
8
|
* Methods for managing content types, libraries and objects
|
|
9
9
|
*
|
|
@@ -2303,7 +2303,7 @@ exports.UpdateContentObjectGraph = /*#__PURE__*/function () {
|
|
|
2303
2303
|
return _context30.delegateYield(_loop(), "t0", 8);
|
|
2304
2304
|
case 8:
|
|
2305
2305
|
_ret = _context30.t0;
|
|
2306
|
-
if (!
|
|
2306
|
+
if (!_ret) {
|
|
2307
2307
|
_context30.next = 11;
|
|
2308
2308
|
break;
|
|
2309
2309
|
}
|
|
@@ -2,8 +2,8 @@ var _defineProperty = require("@babel/runtime/helpers/defineProperty");
|
|
|
2
2
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
3
3
|
var _regeneratorRuntime = require("@babel/runtime/regenerator");
|
|
4
4
|
var _asyncToGenerator = require("@babel/runtime/helpers/asyncToGenerator");
|
|
5
|
-
function ownKeys(
|
|
6
|
-
function _objectSpread(
|
|
5
|
+
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; }
|
|
6
|
+
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; }
|
|
7
7
|
/**
|
|
8
8
|
* Methods for deploying and interacting with contracts
|
|
9
9
|
*
|
package/dist/src/client/Files.js
CHANGED
|
@@ -2,8 +2,8 @@ var _toConsumableArray = require("@babel/runtime/helpers/toConsumableArray");
|
|
|
2
2
|
var _defineProperty = require("@babel/runtime/helpers/defineProperty");
|
|
3
3
|
var _regeneratorRuntime = require("@babel/runtime/regenerator");
|
|
4
4
|
var _asyncToGenerator = require("@babel/runtime/helpers/asyncToGenerator");
|
|
5
|
-
function ownKeys(
|
|
6
|
-
function _objectSpread(
|
|
5
|
+
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; }
|
|
6
|
+
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; }
|
|
7
7
|
/**
|
|
8
8
|
* Methods for accessing and managing access groups
|
|
9
9
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var _defineProperty = require("@babel/runtime/helpers/defineProperty");
|
|
2
2
|
var _classCallCheck = require("@babel/runtime/helpers/classCallCheck");
|
|
3
3
|
var _createClass = require("@babel/runtime/helpers/createClass");
|
|
4
|
-
function ownKeys(
|
|
5
|
-
function _objectSpread(
|
|
4
|
+
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; }
|
|
5
|
+
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; }
|
|
6
6
|
var DefaultABRLadder = {
|
|
7
7
|
"video": [{
|
|
8
8
|
bit_rate: 14000000,
|
|
@@ -107,7 +107,7 @@ var LiveConf = /*#__PURE__*/function () {
|
|
|
107
107
|
this.overwriteOriginUrl = overwriteOriginUrl;
|
|
108
108
|
this.syncAudioToVideo = syncAudioToVideo;
|
|
109
109
|
}
|
|
110
|
-
_createClass(LiveConf, [{
|
|
110
|
+
return _createClass(LiveConf, [{
|
|
111
111
|
key: "probeKind",
|
|
112
112
|
value: function probeKind() {
|
|
113
113
|
var fileNameSplit = this.probeData.format.filename.split(":");
|
|
@@ -222,7 +222,6 @@ var LiveConf = /*#__PURE__*/function () {
|
|
|
222
222
|
} else {
|
|
223
223
|
seg.audio = 29.76 * 48000; // Other codecs are resampled @48000
|
|
224
224
|
}
|
|
225
|
-
|
|
226
225
|
return seg;
|
|
227
226
|
}
|
|
228
227
|
|
|
@@ -562,6 +561,5 @@ var LiveConf = /*#__PURE__*/function () {
|
|
|
562
561
|
return conf;
|
|
563
562
|
}
|
|
564
563
|
}]);
|
|
565
|
-
return LiveConf;
|
|
566
564
|
}();
|
|
567
565
|
exports.LiveConf = LiveConf;
|
|
@@ -427,7 +427,7 @@ var StreamGenerateOffering = /*#__PURE__*/function () {
|
|
|
427
427
|
*/
|
|
428
428
|
exports.StreamStatus = /*#__PURE__*/function () {
|
|
429
429
|
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(_ref7) {
|
|
430
|
-
var name, _ref7$stopLro, stopLro, _ref7$showParams, showParams, objectId, status, libraryId, mainMeta, fabURI, edgeWriteToken, edgeMeta, recordings, sequence, period, tlro, videoLastFinalizationTimeEpochSec, videoFinalizedParts, sinceLastFinalize, recording_period, insertions, i, insertionTimeSinceEpoch, state, lroStatus, playout_urls, playout_options, hls_clear_enabled, hls_aes128_enabled, hls_sample_aes_enabled, networkInfo, token, embed_net, embed_url;
|
|
430
|
+
var name, _ref7$stopLro, stopLro, _ref7$showParams, showParams, objectId, status, libraryId, mainMeta, fabURI, edgeWriteToken, edgeMeta, recordings, sequence, period, tlro, videoLastFinalizationTimeEpochSec, videoFinalizedParts, sinceLastFinalize, recording_period, insertions, i, insertionTimeSinceEpoch, state, lroStatus, segDurationMeta, playout_urls, playout_options, hls_clear_enabled, hls_aes128_enabled, hls_sample_aes_enabled, networkInfo, token, embed_net, embed_url;
|
|
431
431
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
432
432
|
while (1) switch (_context4.prev = _context4.next) {
|
|
433
433
|
case 0:
|
|
@@ -605,107 +605,107 @@ exports.StreamStatus = /*#__PURE__*/function () {
|
|
|
605
605
|
status.error = _context4.t3.response;
|
|
606
606
|
return _context4.abrupt("return", status);
|
|
607
607
|
case 89:
|
|
608
|
-
// Convert LRO 'state' to desired 'state'
|
|
608
|
+
segDurationMeta = edgeMeta.live_recording.recording_config.recording_params.xc_params.seg_duration; // Convert LRO 'state' to desired 'state'
|
|
609
609
|
if (state === "running" && videoLastFinalizationTimeEpochSec <= 0) {
|
|
610
610
|
state = "starting";
|
|
611
|
-
} else if (state === "running" && sinceLastFinalize >
|
|
611
|
+
} else if (state === "running" && segDurationMeta !== undefined && sinceLastFinalize > parseInt(segDurationMeta) + 5) {
|
|
612
612
|
state = "stalled";
|
|
613
613
|
} else if (state == "terminated") {
|
|
614
614
|
state = "stopped";
|
|
615
615
|
}
|
|
616
616
|
status.state = state;
|
|
617
617
|
if (!((state === "running" || state === "stalled" || state === "starting") && stopLro)) {
|
|
618
|
-
_context4.next =
|
|
618
|
+
_context4.next = 111;
|
|
619
619
|
break;
|
|
620
620
|
}
|
|
621
|
-
_context4.next =
|
|
621
|
+
_context4.next = 95;
|
|
622
622
|
return this.FabricUrl({
|
|
623
623
|
libraryId: libraryId,
|
|
624
624
|
objectId: objectId,
|
|
625
625
|
writeToken: edgeWriteToken,
|
|
626
626
|
call: "live/stop/" + tlro
|
|
627
627
|
});
|
|
628
|
-
case
|
|
628
|
+
case 95:
|
|
629
629
|
lroStopUrl = _context4.sent;
|
|
630
|
-
_context4.prev =
|
|
630
|
+
_context4.prev = 96;
|
|
631
631
|
_context4.t4 = this.utils;
|
|
632
|
-
_context4.next =
|
|
632
|
+
_context4.next = 100;
|
|
633
633
|
return HttpClient.Fetch(lroStopUrl);
|
|
634
|
-
case
|
|
634
|
+
case 100:
|
|
635
635
|
_context4.t5 = _context4.sent;
|
|
636
|
-
_context4.next =
|
|
636
|
+
_context4.next = 103;
|
|
637
637
|
return _context4.t4.ResponseToJson.call(_context4.t4, _context4.t5);
|
|
638
|
-
case
|
|
638
|
+
case 103:
|
|
639
639
|
console.log("LRO Stop: ", lroStatus.body);
|
|
640
|
-
_context4.next =
|
|
640
|
+
_context4.next = 109;
|
|
641
641
|
break;
|
|
642
|
-
case
|
|
643
|
-
_context4.prev =
|
|
644
|
-
_context4.t6 = _context4["catch"](
|
|
642
|
+
case 106:
|
|
643
|
+
_context4.prev = 106;
|
|
644
|
+
_context4.t6 = _context4["catch"](96);
|
|
645
645
|
console.log("LRO Stop (failed): ", _context4.t6.response.statusCode);
|
|
646
|
-
case
|
|
646
|
+
case 109:
|
|
647
647
|
state = "stopped";
|
|
648
648
|
status.state = state;
|
|
649
|
-
case
|
|
649
|
+
case 111:
|
|
650
650
|
if (!(state === "running")) {
|
|
651
|
-
_context4.next =
|
|
651
|
+
_context4.next = 142;
|
|
652
652
|
break;
|
|
653
653
|
}
|
|
654
654
|
playout_urls = {};
|
|
655
|
-
_context4.next =
|
|
655
|
+
_context4.next = 115;
|
|
656
656
|
return this.PlayoutOptions({
|
|
657
657
|
objectId: objectId,
|
|
658
658
|
linkPath: "public/asset_metadata/sources/default"
|
|
659
659
|
});
|
|
660
|
-
case
|
|
660
|
+
case 115:
|
|
661
661
|
playout_options = _context4.sent;
|
|
662
662
|
hls_clear_enabled = playout_options && playout_options.hls && playout_options.hls.playoutMethods && playout_options.hls.playoutMethods.clear !== undefined;
|
|
663
663
|
if (!hls_clear_enabled) {
|
|
664
|
-
_context4.next =
|
|
664
|
+
_context4.next = 121;
|
|
665
665
|
break;
|
|
666
666
|
}
|
|
667
|
-
_context4.next =
|
|
667
|
+
_context4.next = 120;
|
|
668
668
|
return this.FabricUrl({
|
|
669
669
|
libraryId: libraryId,
|
|
670
670
|
objectId: objectId,
|
|
671
671
|
rep: "playout/default/hls-clear/playlist.m3u8"
|
|
672
672
|
});
|
|
673
|
-
case 119:
|
|
674
|
-
playout_urls.hls_clear = _context4.sent;
|
|
675
673
|
case 120:
|
|
674
|
+
playout_urls.hls_clear = _context4.sent;
|
|
675
|
+
case 121:
|
|
676
676
|
hls_aes128_enabled = playout_options && playout_options.hls && playout_options.hls.playoutMethods && playout_options.hls.playoutMethods["aes-128"] !== undefined;
|
|
677
677
|
if (!hls_aes128_enabled) {
|
|
678
|
-
_context4.next =
|
|
678
|
+
_context4.next = 126;
|
|
679
679
|
break;
|
|
680
680
|
}
|
|
681
|
-
_context4.next =
|
|
681
|
+
_context4.next = 125;
|
|
682
682
|
return this.FabricUrl({
|
|
683
683
|
libraryId: libraryId,
|
|
684
684
|
objectId: objectId,
|
|
685
685
|
rep: "playout/default/hls-aes128/playlist.m3u8"
|
|
686
686
|
});
|
|
687
|
-
case 124:
|
|
688
|
-
playout_urls.hls_aes128 = _context4.sent;
|
|
689
687
|
case 125:
|
|
688
|
+
playout_urls.hls_aes128 = _context4.sent;
|
|
689
|
+
case 126:
|
|
690
690
|
hls_sample_aes_enabled = playout_options && playout_options.hls && playout_options.hls.playoutMethods && playout_options.hls.playoutMethods["sample-aes"] !== undefined;
|
|
691
691
|
if (!hls_sample_aes_enabled) {
|
|
692
|
-
_context4.next =
|
|
692
|
+
_context4.next = 131;
|
|
693
693
|
break;
|
|
694
694
|
}
|
|
695
|
-
_context4.next =
|
|
695
|
+
_context4.next = 130;
|
|
696
696
|
return this.FabricUrl({
|
|
697
697
|
libraryId: libraryId,
|
|
698
698
|
objectId: objectId,
|
|
699
699
|
rep: "playout/default/hls-sample-aes/playlist.m3u8"
|
|
700
700
|
});
|
|
701
|
-
case 129:
|
|
702
|
-
playout_urls.hls_sample_aes = _context4.sent;
|
|
703
701
|
case 130:
|
|
704
|
-
|
|
702
|
+
playout_urls.hls_sample_aes = _context4.sent;
|
|
703
|
+
case 131:
|
|
704
|
+
_context4.next = 133;
|
|
705
705
|
return this.NetworkInfo();
|
|
706
|
-
case
|
|
706
|
+
case 133:
|
|
707
707
|
networkInfo = _context4.sent;
|
|
708
|
-
_context4.next =
|
|
708
|
+
_context4.next = 136;
|
|
709
709
|
return this.authClient.AuthorizationToken({
|
|
710
710
|
libraryId: libraryId,
|
|
711
711
|
objectId: objectId,
|
|
@@ -713,7 +713,7 @@ exports.StreamStatus = /*#__PURE__*/function () {
|
|
|
713
713
|
noCache: true,
|
|
714
714
|
noAuth: true
|
|
715
715
|
});
|
|
716
|
-
case
|
|
716
|
+
case 136:
|
|
717
717
|
token = _context4.sent;
|
|
718
718
|
embed_net = "main";
|
|
719
719
|
if (networkInfo.name.includes("demo")) {
|
|
@@ -722,20 +722,20 @@ exports.StreamStatus = /*#__PURE__*/function () {
|
|
|
722
722
|
embed_url = "https://embed.v3.contentfabric.io/?net=".concat(embed_net, "&p&ct=h&oid=").concat(objectId, "&mt=lv&ath=").concat(token);
|
|
723
723
|
playout_urls.embed_url = embed_url;
|
|
724
724
|
status.playout_urls = playout_urls;
|
|
725
|
-
case
|
|
726
|
-
_context4.next =
|
|
725
|
+
case 142:
|
|
726
|
+
_context4.next = 147;
|
|
727
727
|
break;
|
|
728
|
-
case
|
|
729
|
-
_context4.prev =
|
|
728
|
+
case 144:
|
|
729
|
+
_context4.prev = 144;
|
|
730
730
|
_context4.t7 = _context4["catch"](3);
|
|
731
731
|
console.error(_context4.t7);
|
|
732
|
-
case 146:
|
|
733
|
-
return _context4.abrupt("return", status);
|
|
734
732
|
case 147:
|
|
733
|
+
return _context4.abrupt("return", status);
|
|
734
|
+
case 148:
|
|
735
735
|
case "end":
|
|
736
736
|
return _context4.stop();
|
|
737
737
|
}
|
|
738
|
-
}, _callee4, this, [[3,
|
|
738
|
+
}, _callee4, this, [[3, 144], [34, 40], [69, 83], [96, 106]]);
|
|
739
739
|
}));
|
|
740
740
|
return function (_x4) {
|
|
741
741
|
return _ref8.apply(this, arguments);
|
|
@@ -833,7 +833,6 @@ exports.StreamCreate = /*#__PURE__*/function () {
|
|
|
833
833
|
edge_write_token: edgeToken,
|
|
834
834
|
state: "active" // indicates there is an active session (set to 'closed' when done)
|
|
835
835
|
},
|
|
836
|
-
|
|
837
836
|
fabric_config: {
|
|
838
837
|
edge_write_token: edgeToken
|
|
839
838
|
}
|
|
@@ -1476,7 +1475,6 @@ exports.StreamInsertion = /*#__PURE__*/function () {
|
|
|
1476
1475
|
insertionInfo = {
|
|
1477
1476
|
duration_sec: 0 // Minimum of video and audio duration
|
|
1478
1477
|
};
|
|
1479
|
-
|
|
1480
1478
|
["video", "audio"].forEach(function (mt) {
|
|
1481
1479
|
var stream = offeringMeta.media_struct.streams[mt];
|
|
1482
1480
|
insertionInfo[mt] = {
|
package/dist/src/client/NFT.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var _regeneratorRuntime = require("@babel/runtime/regenerator");
|
|
2
2
|
var _defineProperty = require("@babel/runtime/helpers/defineProperty");
|
|
3
3
|
var _asyncToGenerator = require("@babel/runtime/helpers/asyncToGenerator");
|
|
4
|
-
function ownKeys(
|
|
5
|
-
function _objectSpread(
|
|
4
|
+
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; }
|
|
5
|
+
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; }
|
|
6
6
|
/**
|
|
7
7
|
* Methods for creating and managing NFTs
|
|
8
8
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var _defineProperty = require("@babel/runtime/helpers/defineProperty");
|
|
2
2
|
var _regeneratorRuntime = require("@babel/runtime/regenerator");
|
|
3
3
|
var _asyncToGenerator = require("@babel/runtime/helpers/asyncToGenerator");
|
|
4
|
-
function ownKeys(
|
|
5
|
-
function _objectSpread(
|
|
4
|
+
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; }
|
|
5
|
+
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; }
|
|
6
6
|
var Utils = require("../Utils");
|
|
7
7
|
var UrlJoin = require("url-join");
|
|
8
8
|
var _require = require("./Utils"),
|
|
@@ -2,8 +2,8 @@ var _defineProperty = require("@babel/runtime/helpers/defineProperty");
|
|
|
2
2
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
3
3
|
var _regeneratorRuntime = require("@babel/runtime/regenerator");
|
|
4
4
|
var _asyncToGenerator = require("@babel/runtime/helpers/asyncToGenerator");
|
|
5
|
-
function ownKeys(
|
|
6
|
-
function _objectSpread(
|
|
5
|
+
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; }
|
|
6
|
+
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; }
|
|
7
7
|
var Utils = require("../Utils");
|
|
8
8
|
var UrlJoin = require("url-join");
|
|
9
9
|
var StateStorePath = function StateStorePath(_ref) {
|
|
@@ -2,8 +2,8 @@ var _regeneratorRuntime = require("@babel/runtime/regenerator");
|
|
|
2
2
|
var _asyncToGenerator = require("@babel/runtime/helpers/asyncToGenerator");
|
|
3
3
|
var _defineProperty = require("@babel/runtime/helpers/defineProperty");
|
|
4
4
|
var _slicedToArray = require("@babel/runtime/helpers/slicedToArray");
|
|
5
|
-
function ownKeys(
|
|
6
|
-
function _objectSpread(
|
|
5
|
+
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; }
|
|
6
|
+
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; }
|
|
7
7
|
var Utils = require("../Utils");
|
|
8
8
|
var RarityToPercentage = function RarityToPercentage(rarity) {
|
|
9
9
|
if (!rarity) {
|
|
@@ -7,8 +7,8 @@ var _asyncToGenerator = require("@babel/runtime/helpers/asyncToGenerator");
|
|
|
7
7
|
var _classCallCheck = require("@babel/runtime/helpers/classCallCheck");
|
|
8
8
|
var _createClass = require("@babel/runtime/helpers/createClass");
|
|
9
9
|
var _excluded = ["code", "address", "type", "authToken", "expiresAt"];
|
|
10
|
-
function ownKeys(
|
|
11
|
-
function _objectSpread(
|
|
10
|
+
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; }
|
|
11
|
+
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; }
|
|
12
12
|
var _require = require("../ElvClient"),
|
|
13
13
|
ElvClient = _require.ElvClient;
|
|
14
14
|
var Configuration = require("./Configuration");
|
|
@@ -79,7 +79,7 @@ var ElvWalletClient = /*#__PURE__*/function () {
|
|
|
79
79
|
this.utils = client.utils;
|
|
80
80
|
this.ForbiddenMethods = ElvWalletClient.ForbiddenMethods;
|
|
81
81
|
}
|
|
82
|
-
_createClass(ElvWalletClient, [{
|
|
82
|
+
return _createClass(ElvWalletClient, [{
|
|
83
83
|
key: "Log",
|
|
84
84
|
value: function Log(message) {
|
|
85
85
|
var error = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
@@ -136,7 +136,7 @@ var ElvWalletClient = /*#__PURE__*/function () {
|
|
|
136
136
|
*/
|
|
137
137
|
}, {
|
|
138
138
|
key: "PersonalSign",
|
|
139
|
-
value: function () {
|
|
139
|
+
value: (function () {
|
|
140
140
|
var _PersonalSign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref2) {
|
|
141
141
|
var message, parameters, url;
|
|
142
142
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
@@ -265,7 +265,7 @@ var ElvWalletClient = /*#__PURE__*/function () {
|
|
|
265
265
|
return _PersonalSign.apply(this, arguments);
|
|
266
266
|
}
|
|
267
267
|
return PersonalSign;
|
|
268
|
-
}()
|
|
268
|
+
}())
|
|
269
269
|
}, {
|
|
270
270
|
key: "LogInURL",
|
|
271
271
|
value: function () {
|
|
@@ -344,7 +344,7 @@ var ElvWalletClient = /*#__PURE__*/function () {
|
|
|
344
344
|
*/
|
|
345
345
|
}, {
|
|
346
346
|
key: "LogIn",
|
|
347
|
-
value: function () {
|
|
347
|
+
value: (function () {
|
|
348
348
|
var _LogIn = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(_ref5) {
|
|
349
349
|
var _this = this;
|
|
350
350
|
var _ref5$method, method, provider, _ref5$mode, mode, callbackUrl, marketplaceParams, _ref5$clearLogin, clearLogin, callback, loginUrl;
|
|
@@ -463,9 +463,10 @@ var ElvWalletClient = /*#__PURE__*/function () {
|
|
|
463
463
|
*
|
|
464
464
|
* @methodGroup Login
|
|
465
465
|
*/
|
|
466
|
+
)
|
|
466
467
|
}, {
|
|
467
468
|
key: "LogOut",
|
|
468
|
-
value: function () {
|
|
469
|
+
value: (function () {
|
|
469
470
|
var _LogOut = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8() {
|
|
470
471
|
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
471
472
|
while (1) switch (_context8.prev = _context8.next) {
|
|
@@ -508,7 +509,7 @@ var ElvWalletClient = /*#__PURE__*/function () {
|
|
|
508
509
|
return _LogOut.apply(this, arguments);
|
|
509
510
|
}
|
|
510
511
|
return LogOut;
|
|
511
|
-
}()
|
|
512
|
+
}())
|
|
512
513
|
}, {
|
|
513
514
|
key: "TokenStatus",
|
|
514
515
|
value: function () {
|
|
@@ -548,7 +549,7 @@ var ElvWalletClient = /*#__PURE__*/function () {
|
|
|
548
549
|
*/
|
|
549
550
|
}, {
|
|
550
551
|
key: "Authenticate",
|
|
551
|
-
value: function () {
|
|
552
|
+
value: (function () {
|
|
552
553
|
var _Authenticate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(_ref7) {
|
|
553
554
|
var token, decodedToken;
|
|
554
555
|
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
@@ -614,9 +615,10 @@ var ElvWalletClient = /*#__PURE__*/function () {
|
|
|
614
615
|
* - signingToken - Identical to `authToken`, but also includes the ability to perform arbitrary signatures with the custodial wallet. This token should be protected and should not be
|
|
615
616
|
* shared with third parties.
|
|
616
617
|
*/
|
|
618
|
+
)
|
|
617
619
|
}, {
|
|
618
620
|
key: "AuthenticateOAuth",
|
|
619
|
-
value: function () {
|
|
621
|
+
value: (function () {
|
|
620
622
|
var _AuthenticateOAuth = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(_ref8) {
|
|
621
623
|
var idToken, tenantId, email, signerURIs, _ref8$shareEmail, shareEmail, _ref8$extraData, extraData, nonce, _ref8$createRemoteTok, createRemoteToken, _ref8$force, force, tokenDuration, fabricToken, expiresAt, tokenResponse, address, decodedToken;
|
|
622
624
|
return _regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
@@ -744,9 +746,10 @@ var ElvWalletClient = /*#__PURE__*/function () {
|
|
|
744
746
|
* @returns {Promise<string>} - Returns an authorization token that can be used to initialize the client using <a href="#Authenticate">Authenticate</a>.
|
|
745
747
|
* Save this token to avoid having to reauthenticate. This token expires after 24 hours.
|
|
746
748
|
*/
|
|
749
|
+
)
|
|
747
750
|
}, {
|
|
748
751
|
key: "AuthenticateExternalWallet",
|
|
749
|
-
value: function () {
|
|
752
|
+
value: (function () {
|
|
750
753
|
var _AuthenticateExternalWallet = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(_ref9) {
|
|
751
754
|
var _this2 = this;
|
|
752
755
|
var address, _ref9$tokenDuration, tokenDuration, _ref9$walletName, walletName, Sign, expiresAt, fabricToken;
|
|
@@ -815,6 +818,7 @@ var ElvWalletClient = /*#__PURE__*/function () {
|
|
|
815
818
|
*
|
|
816
819
|
* @returns {string} - The client auth token
|
|
817
820
|
*/
|
|
821
|
+
)
|
|
818
822
|
}, {
|
|
819
823
|
key: "ClientAuthToken",
|
|
820
824
|
value: function ClientAuthToken() {
|
|
@@ -1978,7 +1982,7 @@ var ElvWalletClient = /*#__PURE__*/function () {
|
|
|
1978
1982
|
*/
|
|
1979
1983
|
}, {
|
|
1980
1984
|
key: "Initialize",
|
|
1981
|
-
value: function () {
|
|
1985
|
+
value: (function () {
|
|
1982
1986
|
var _Initialize = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25(_ref24) {
|
|
1983
1987
|
var client, _ref24$appId, appId, _ref24$network, network, _ref24$mode, mode, localization, marketplaceParams, previewMarketplaceId, _ref24$storeAuthToken, storeAuthToken, _ref24$skipMarketplac, skipMarketplaceLoad, _ref25, tenantSlug, marketplaceSlug, marketplaceId, marketplaceHash, previewMarketplaceHash, walletClient, url, savedToken;
|
|
1984
1988
|
return _regeneratorRuntime.wrap(function _callee25$(_context25) {
|
|
@@ -2096,9 +2100,8 @@ var ElvWalletClient = /*#__PURE__*/function () {
|
|
|
2096
2100
|
return _Initialize.apply(this, arguments);
|
|
2097
2101
|
}
|
|
2098
2102
|
return Initialize;
|
|
2099
|
-
}()
|
|
2103
|
+
}())
|
|
2100
2104
|
}]);
|
|
2101
|
-
return ElvWalletClient;
|
|
2102
2105
|
}();
|
|
2103
2106
|
Object.assign(ElvWalletClient.prototype, require("./ClientMethods"));
|
|
2104
2107
|
Object.assign(ElvWalletClient.prototype, require("./Profile"));
|
package/package.json
CHANGED
package/src/client/LiveStream.js
CHANGED
|
@@ -515,10 +515,12 @@ exports.StreamStatus = async function({name, stopLro=false, showParams=false}) {
|
|
|
515
515
|
return status;
|
|
516
516
|
}
|
|
517
517
|
|
|
518
|
+
const segDurationMeta = edgeMeta.live_recording.recording_config.recording_params.xc_params.seg_duration
|
|
519
|
+
|
|
518
520
|
// Convert LRO 'state' to desired 'state'
|
|
519
521
|
if(state === "running" && videoLastFinalizationTimeEpochSec <= 0) {
|
|
520
522
|
state = "starting";
|
|
521
|
-
} else if(state === "running" && sinceLastFinalize >
|
|
523
|
+
} else if(state === "running" && segDurationMeta !== undefined && sinceLastFinalize > (parseInt(segDurationMeta) + 5)) {
|
|
522
524
|
state = "stalled";
|
|
523
525
|
} else if(state == "terminated") {
|
|
524
526
|
state = "stopped";
|