@eluvio/elv-client-js 4.0.131 → 4.0.132
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 +263 -222
- package/dist/src/ElvWallet.js +7 -5
- package/dist/src/EthClient.js +8 -9
- package/dist/src/FrameClient.js +9 -10
- package/dist/src/HttpClient.js +5 -5
- package/dist/src/Id.js +1 -2
- package/dist/src/PermissionsClient.js +31 -19
- package/dist/src/RemoteSigner.js +10 -11
- 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 +8 -12
- package/dist/src/client/ContentManagement.js +82 -72
- package/dist/src/client/Contracts.js +2 -2
- package/dist/src/client/Files.js +2 -2
- package/dist/src/client/LiveConf.js +31 -17
- package/dist/src/client/LiveStream.js +2 -4
- package/dist/src/client/NFT.js +2 -2
- package/dist/src/client/Shares.js +47 -24
- 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 +63 -48
- package/package.json +1 -1
- package/src/client/LiveConf.js +20 -24
- package/src/client/LiveStream.js +1 -0
|
@@ -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
|
*
|
|
@@ -421,11 +421,11 @@ exports.CreateContentType = /*#__PURE__*/function () {
|
|
|
421
421
|
* @param {string} name - Library name
|
|
422
422
|
* @param {string=} description - Library description
|
|
423
423
|
* @param {blob=} image - Image associated with the library
|
|
424
|
-
* @param {string=}
|
|
424
|
+
* @param {string=} imageName - Name of the image associated with the library (required if image specified)
|
|
425
425
|
* @param {Object=} metadata - Metadata of library object
|
|
426
426
|
* @param {string=} kmsId - ID of the KMS to use for content in this library. If not specified,
|
|
427
427
|
* the default KMS will be used.
|
|
428
|
-
* @param {string=}
|
|
428
|
+
* @param {string=} tenantContractId - ID of the tenant to use for this library
|
|
429
429
|
*
|
|
430
430
|
* @returns {Promise<string>} - Library ID of created library
|
|
431
431
|
*/
|
|
@@ -657,32 +657,17 @@ exports.SetContentObjectImage = /*#__PURE__*/function () {
|
|
|
657
657
|
*/
|
|
658
658
|
exports.DeleteContentLibrary = /*#__PURE__*/function () {
|
|
659
659
|
var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(_ref14) {
|
|
660
|
-
var libraryId
|
|
660
|
+
var libraryId;
|
|
661
661
|
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
662
662
|
while (1) switch (_context8.prev = _context8.next) {
|
|
663
663
|
case 0:
|
|
664
664
|
libraryId = _ref14.libraryId;
|
|
665
|
-
throw Error("
|
|
666
|
-
case
|
|
667
|
-
authorizationHeader = _context8.sent;
|
|
668
|
-
_context8.next = 9;
|
|
669
|
-
return this.CallContractMethodAndWait({
|
|
670
|
-
contractAddress: this.utils.HashToAddress(libraryId),
|
|
671
|
-
methodName: "kill",
|
|
672
|
-
methodArgs: []
|
|
673
|
-
});
|
|
674
|
-
case 9:
|
|
675
|
-
_context8.next = 11;
|
|
676
|
-
return this.HttpClient.Request({
|
|
677
|
-
headers: authorizationHeader,
|
|
678
|
-
method: "DELETE",
|
|
679
|
-
path: path
|
|
680
|
-
});
|
|
681
|
-
case 11:
|
|
665
|
+
throw Error("Delete library not supported. (".concat(libraryId, ")"));
|
|
666
|
+
case 2:
|
|
682
667
|
case "end":
|
|
683
668
|
return _context8.stop();
|
|
684
669
|
}
|
|
685
|
-
}, _callee8
|
|
670
|
+
}, _callee8);
|
|
686
671
|
}));
|
|
687
672
|
return function (_x8) {
|
|
688
673
|
return _ref15.apply(this, arguments);
|
|
@@ -828,7 +813,11 @@ exports.RemoveLibraryContentType = /*#__PURE__*/function () {
|
|
|
828
813
|
*
|
|
829
814
|
* meta: Metadata to use for the new object
|
|
830
815
|
*
|
|
831
|
-
*
|
|
816
|
+
* noEncryptionConk: Set to true to prevent creation of an encryption conk for the object
|
|
817
|
+
*
|
|
818
|
+
* createKMSConk: Set to true to create a KMS conk for object (usually for sharing a playable object) (incompatible with noEncryptionConk: true)
|
|
819
|
+
*
|
|
820
|
+
* @returns {Promise<Object>} - Response containing the object ID and write token of the draft, as well as the url of the node that created the write token.
|
|
832
821
|
*/
|
|
833
822
|
exports.CreateContentObject = /*#__PURE__*/function () {
|
|
834
823
|
var _ref21 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(_ref20) {
|
|
@@ -842,143 +831,164 @@ exports.CreateContentObject = /*#__PURE__*/function () {
|
|
|
842
831
|
ValidateObject(objectId);
|
|
843
832
|
}
|
|
844
833
|
this.Log("Creating content object: ".concat(libraryId, " ").concat(objectId || ""));
|
|
845
|
-
|
|
846
|
-
|
|
834
|
+
if (!(options.noEncryptionConk && options.createKMSConk)) {
|
|
835
|
+
_context11.next = 6;
|
|
836
|
+
break;
|
|
837
|
+
}
|
|
838
|
+
throw new Error("Incompatible options: noEncryptionConk and createKMSConk both set to true");
|
|
839
|
+
case 6:
|
|
847
840
|
if (!options.type) {
|
|
848
|
-
_context11.next =
|
|
841
|
+
_context11.next = 28;
|
|
849
842
|
break;
|
|
850
843
|
}
|
|
851
844
|
this.Log("Type specified: ".concat(options.type));
|
|
852
845
|
type = options.type;
|
|
853
846
|
if (!type.startsWith("hq__")) {
|
|
854
|
-
_context11.next =
|
|
847
|
+
_context11.next = 15;
|
|
855
848
|
break;
|
|
856
849
|
}
|
|
857
|
-
_context11.next =
|
|
850
|
+
_context11.next = 12;
|
|
858
851
|
return this.ContentType({
|
|
859
852
|
versionHash: type
|
|
860
853
|
});
|
|
861
|
-
case
|
|
854
|
+
case 12:
|
|
862
855
|
type = _context11.sent;
|
|
863
|
-
_context11.next =
|
|
856
|
+
_context11.next = 24;
|
|
864
857
|
break;
|
|
865
|
-
case
|
|
858
|
+
case 15:
|
|
866
859
|
if (!type.startsWith("iq__")) {
|
|
867
|
-
_context11.next =
|
|
860
|
+
_context11.next = 21;
|
|
868
861
|
break;
|
|
869
862
|
}
|
|
870
|
-
_context11.next =
|
|
863
|
+
_context11.next = 18;
|
|
871
864
|
return this.ContentType({
|
|
872
865
|
typeId: type
|
|
873
866
|
});
|
|
874
|
-
case
|
|
867
|
+
case 18:
|
|
875
868
|
type = _context11.sent;
|
|
876
|
-
_context11.next =
|
|
869
|
+
_context11.next = 24;
|
|
877
870
|
break;
|
|
878
|
-
case
|
|
879
|
-
_context11.next =
|
|
871
|
+
case 21:
|
|
872
|
+
_context11.next = 23;
|
|
880
873
|
return this.ContentType({
|
|
881
874
|
name: type
|
|
882
875
|
});
|
|
883
|
-
case
|
|
876
|
+
case 23:
|
|
884
877
|
type = _context11.sent;
|
|
885
|
-
case
|
|
878
|
+
case 24:
|
|
886
879
|
if (type) {
|
|
887
|
-
_context11.next =
|
|
880
|
+
_context11.next = 26;
|
|
888
881
|
break;
|
|
889
882
|
}
|
|
890
883
|
throw Error("Unable to find content type '".concat(options.type, "'"));
|
|
891
|
-
case
|
|
884
|
+
case 26:
|
|
892
885
|
typeId = type.id;
|
|
893
886
|
options.type = type.hash;
|
|
894
|
-
case
|
|
887
|
+
case 28:
|
|
895
888
|
if (objectId) {
|
|
896
|
-
_context11.next =
|
|
889
|
+
_context11.next = 46;
|
|
897
890
|
break;
|
|
898
891
|
}
|
|
899
|
-
_context11.next =
|
|
892
|
+
_context11.next = 31;
|
|
900
893
|
return this.CurrentAccountAddress();
|
|
901
|
-
case
|
|
894
|
+
case 31:
|
|
902
895
|
currentAccountAddress = _context11.sent;
|
|
903
|
-
_context11.next =
|
|
896
|
+
_context11.next = 34;
|
|
904
897
|
return this.CallContractMethod({
|
|
905
898
|
contractAddress: this.utils.HashToAddress(libraryId),
|
|
906
899
|
methodName: "canContribute",
|
|
907
900
|
methodArgs: [currentAccountAddress]
|
|
908
901
|
});
|
|
909
|
-
case
|
|
902
|
+
case 34:
|
|
910
903
|
canContribute = _context11.sent;
|
|
911
904
|
if (canContribute) {
|
|
912
|
-
_context11.next =
|
|
905
|
+
_context11.next = 37;
|
|
913
906
|
break;
|
|
914
907
|
}
|
|
915
908
|
throw Error("Current user does not have permission to create content in library ".concat(libraryId));
|
|
916
|
-
case
|
|
909
|
+
case 37:
|
|
917
910
|
this.Log("Deploying contract...");
|
|
918
|
-
_context11.next =
|
|
911
|
+
_context11.next = 40;
|
|
919
912
|
return this.authClient.CreateContentObject({
|
|
920
913
|
libraryId: libraryId,
|
|
921
914
|
typeId: typeId
|
|
922
915
|
});
|
|
923
|
-
case
|
|
916
|
+
case 40:
|
|
924
917
|
_yield$this$authClien3 = _context11.sent;
|
|
925
918
|
contractAddress = _yield$this$authClien3.contractAddress;
|
|
926
919
|
objectId = this.utils.AddressToObjectId(contractAddress);
|
|
927
920
|
this.Log("Contract deployed: ".concat(contractAddress, " ").concat(objectId));
|
|
928
|
-
_context11.next =
|
|
921
|
+
_context11.next = 53;
|
|
929
922
|
break;
|
|
930
|
-
case
|
|
923
|
+
case 46:
|
|
931
924
|
_context11.t0 = this;
|
|
932
925
|
_context11.t1 = "Contract already deployed for contract type: ";
|
|
933
|
-
_context11.next =
|
|
926
|
+
_context11.next = 50;
|
|
934
927
|
return this.AccessType({
|
|
935
928
|
id: objectId
|
|
936
929
|
});
|
|
937
|
-
case
|
|
930
|
+
case 50:
|
|
938
931
|
_context11.t2 = _context11.sent;
|
|
939
932
|
_context11.t3 = _context11.t1.concat.call(_context11.t1, _context11.t2);
|
|
940
933
|
_context11.t0.Log.call(_context11.t0, _context11.t3);
|
|
941
|
-
case
|
|
934
|
+
case 53:
|
|
942
935
|
if (!options.visibility) {
|
|
943
|
-
_context11.next =
|
|
936
|
+
_context11.next = 57;
|
|
944
937
|
break;
|
|
945
938
|
}
|
|
946
939
|
this.Log("Setting visibility to ".concat(options.visibility));
|
|
947
|
-
_context11.next =
|
|
940
|
+
_context11.next = 57;
|
|
948
941
|
return this.SetVisibility({
|
|
949
942
|
id: objectId,
|
|
950
943
|
visibility: options.visibility
|
|
951
944
|
});
|
|
952
|
-
case
|
|
945
|
+
case 57:
|
|
953
946
|
path = UrlJoin("qid", objectId);
|
|
954
947
|
_context11.t4 = this.HttpClient;
|
|
955
|
-
_context11.next =
|
|
948
|
+
_context11.next = 61;
|
|
956
949
|
return this.authClient.AuthorizationHeader({
|
|
957
950
|
libraryId: libraryId,
|
|
958
951
|
objectId: objectId,
|
|
959
952
|
update: true
|
|
960
953
|
});
|
|
961
|
-
case
|
|
954
|
+
case 61:
|
|
962
955
|
_context11.t5 = _context11.sent;
|
|
963
956
|
_context11.t6 = path;
|
|
964
|
-
_context11.t7 =
|
|
957
|
+
_context11.t7 = {
|
|
958
|
+
// filter out options not recognized by server (noEncryptionConk, createKMSConk)
|
|
959
|
+
type: options.type,
|
|
960
|
+
meta: options.meta
|
|
961
|
+
};
|
|
965
962
|
_context11.t8 = {
|
|
966
963
|
headers: _context11.t5,
|
|
967
964
|
method: "POST",
|
|
968
965
|
path: _context11.t6,
|
|
969
966
|
body: _context11.t7
|
|
970
967
|
};
|
|
971
|
-
_context11.next =
|
|
968
|
+
_context11.next = 67;
|
|
972
969
|
return _context11.t4.Request.call(_context11.t4, _context11.t8);
|
|
973
|
-
case
|
|
970
|
+
case 67:
|
|
974
971
|
rawCreateResponse = _context11.sent;
|
|
975
972
|
// extract the url for the node that handled the request
|
|
976
|
-
//
|
|
973
|
+
// (not strictly needed now that we can quickly look up node URL for a write token,
|
|
974
|
+
// but still convenient)
|
|
977
975
|
nodeUrl = new URL(rawCreateResponse.url).origin;
|
|
978
|
-
_context11.next =
|
|
976
|
+
_context11.next = 71;
|
|
979
977
|
return this.utils.ResponseToJson(rawCreateResponse, this.HttpClient.debug, this.HttpClient.Log.bind(this.HttpClient));
|
|
980
|
-
case
|
|
978
|
+
case 71:
|
|
981
979
|
createResponse = _context11.sent;
|
|
980
|
+
if (options.noEncryptionConk) {
|
|
981
|
+
_context11.next = 75;
|
|
982
|
+
break;
|
|
983
|
+
}
|
|
984
|
+
_context11.next = 75;
|
|
985
|
+
return this.CreateEncryptionConk({
|
|
986
|
+
libraryId: libraryId,
|
|
987
|
+
objectId: objectId,
|
|
988
|
+
writeToken: createResponse.write_token,
|
|
989
|
+
createKMSConk: !!options.createKMSConk // make sure `undefined` gets converted to `false`
|
|
990
|
+
});
|
|
991
|
+
case 75:
|
|
982
992
|
// Record the node used in creating this write token
|
|
983
993
|
this.RecordWriteToken({
|
|
984
994
|
writeToken: createResponse.write_token,
|
|
@@ -988,7 +998,7 @@ exports.CreateContentObject = /*#__PURE__*/function () {
|
|
|
988
998
|
createResponse.objectId = createResponse.id;
|
|
989
999
|
createResponse.nodeUrl = nodeUrl;
|
|
990
1000
|
return _context11.abrupt("return", createResponse);
|
|
991
|
-
case
|
|
1001
|
+
case 80:
|
|
992
1002
|
case "end":
|
|
993
1003
|
return _context11.stop();
|
|
994
1004
|
}
|
|
@@ -2303,7 +2313,7 @@ exports.UpdateContentObjectGraph = /*#__PURE__*/function () {
|
|
|
2303
2313
|
return _context30.delegateYield(_loop(), "t0", 8);
|
|
2304
2314
|
case 8:
|
|
2305
2315
|
_ret = _context30.t0;
|
|
2306
|
-
if (!
|
|
2316
|
+
if (!_ret) {
|
|
2307
2317
|
_context30.next = 11;
|
|
2308
2318
|
break;
|
|
2309
2319
|
}
|
|
@@ -2451,12 +2461,12 @@ exports.CreateLinks = /*#__PURE__*/function () {
|
|
|
2451
2461
|
return _regeneratorRuntime.wrap(function _callee31$(_context32) {
|
|
2452
2462
|
while (1) switch (_context32.prev = _context32.next) {
|
|
2453
2463
|
case 0:
|
|
2454
|
-
path = info.path.replace(/^(
|
|
2464
|
+
path = info.path.replace(/^([/.])+/, "");
|
|
2455
2465
|
type = (info.type || "file") === "file" ? "files" : info.type;
|
|
2456
2466
|
if (type === "metadata") {
|
|
2457
2467
|
type = "meta";
|
|
2458
2468
|
}
|
|
2459
|
-
target = authTarget = info.target.replace(/^(
|
|
2469
|
+
target = authTarget = info.target.replace(/^([/.])+/, "");
|
|
2460
2470
|
if (info.targetHash) {
|
|
2461
2471
|
target = "/qfab/".concat(info.targetHash, "/").concat(type, "/").concat(target);
|
|
2462
2472
|
} else {
|
|
@@ -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,9 @@
|
|
|
1
|
+
var _slicedToArray = require("@babel/runtime/helpers/slicedToArray");
|
|
1
2
|
var _defineProperty = require("@babel/runtime/helpers/defineProperty");
|
|
2
3
|
var _classCallCheck = require("@babel/runtime/helpers/classCallCheck");
|
|
3
4
|
var _createClass = require("@babel/runtime/helpers/createClass");
|
|
4
|
-
function ownKeys(
|
|
5
|
-
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; }
|
|
6
7
|
/* eslint no-console: 0 */
|
|
7
8
|
|
|
8
9
|
var DefaultABRLadder = {
|
|
@@ -109,7 +110,7 @@ var LiveConf = /*#__PURE__*/function () {
|
|
|
109
110
|
this.overwriteOriginUrl = overwriteOriginUrl;
|
|
110
111
|
this.syncAudioToVideo = syncAudioToVideo;
|
|
111
112
|
}
|
|
112
|
-
_createClass(LiveConf, [{
|
|
113
|
+
return _createClass(LiveConf, [{
|
|
113
114
|
key: "probeKind",
|
|
114
115
|
value: function probeKind() {
|
|
115
116
|
var fileNameSplit = this.probeData.format.filename.split(":");
|
|
@@ -224,7 +225,6 @@ var LiveConf = /*#__PURE__*/function () {
|
|
|
224
225
|
} else {
|
|
225
226
|
seg.audio = 29.76 * 48000; // Other codecs are resampled @48000
|
|
226
227
|
}
|
|
227
|
-
|
|
228
228
|
return seg;
|
|
229
229
|
}
|
|
230
230
|
|
|
@@ -447,18 +447,6 @@ var LiveConf = /*#__PURE__*/function () {
|
|
|
447
447
|
if (this.syncAudioToVideo) {
|
|
448
448
|
conf.live_recording.recording_config.recording_params.xc_params.sync_audio_to_stream_id = this.syncAudioToStreamIdValue();
|
|
449
449
|
}
|
|
450
|
-
if (customSettings.edge_write_token) {
|
|
451
|
-
conf.live_recording.fabric_config.edge_write_token = customSettings.edge_write_token;
|
|
452
|
-
}
|
|
453
|
-
if (customSettings.part_ttl) {
|
|
454
|
-
conf.live_recording.recording_config.recording_params.part_ttl = customSettings.part_ttl;
|
|
455
|
-
}
|
|
456
|
-
if (customSettings.connection_timeout) {
|
|
457
|
-
conf.live_recording.recording_config.recording_params.xc_params.connection_timeout = customSettings.connection_timeout;
|
|
458
|
-
}
|
|
459
|
-
if (customSettings.reconnect_timeout) {
|
|
460
|
-
conf.live_recording.recording_config.recording_params.reconnect_timeout = customSettings.reconnect_timeout;
|
|
461
|
-
}
|
|
462
450
|
|
|
463
451
|
// Fill in specifics for protocol
|
|
464
452
|
switch (this.probeKind()) {
|
|
@@ -561,9 +549,35 @@ var LiveConf = /*#__PURE__*/function () {
|
|
|
561
549
|
// Global recording bitrate for all audio streams
|
|
562
550
|
conf.live_recording.recording_config.recording_params.xc_params.audio_bitrate = globalAudioBitrate;
|
|
563
551
|
conf.live_recording.recording_config.recording_params.xc_params.n_audio = nAudio;
|
|
552
|
+
|
|
553
|
+
// Iterate through custom settings (which will override any existing setting)
|
|
554
|
+
function SetByPath(_ref6) {
|
|
555
|
+
var obj = _ref6.obj,
|
|
556
|
+
path = _ref6.path,
|
|
557
|
+
value = _ref6.value;
|
|
558
|
+
var keys = path.split(".");
|
|
559
|
+
var temp = obj;
|
|
560
|
+
for (var _i3 = 0; _i3 < keys.length - 1; _i3++) {
|
|
561
|
+
if (!temp[keys[_i3]]) {
|
|
562
|
+
temp[keys[_i3]] = {};
|
|
563
|
+
}
|
|
564
|
+
temp = temp[keys[_i3]];
|
|
565
|
+
}
|
|
566
|
+
temp[keys[keys.length - 1]] = value;
|
|
567
|
+
}
|
|
568
|
+
var metaPathValues = customSettings.metaPathValues;
|
|
569
|
+
for (var _i4 = 0, _Object$entries = Object.entries(metaPathValues || {}); _i4 < _Object$entries.length; _i4++) {
|
|
570
|
+
var _Object$entries$_i = _slicedToArray(_Object$entries[_i4], 2),
|
|
571
|
+
path = _Object$entries$_i[0],
|
|
572
|
+
value = _Object$entries$_i[1];
|
|
573
|
+
SetByPath({
|
|
574
|
+
obj: conf,
|
|
575
|
+
path: path,
|
|
576
|
+
value: value
|
|
577
|
+
});
|
|
578
|
+
}
|
|
564
579
|
return conf;
|
|
565
580
|
}
|
|
566
581
|
}]);
|
|
567
|
-
return LiveConf;
|
|
568
582
|
}();
|
|
569
583
|
exports.LiveConf = LiveConf;
|
|
@@ -835,7 +835,6 @@ exports.StreamCreate = /*#__PURE__*/function () {
|
|
|
835
835
|
edge_write_token: edgeToken,
|
|
836
836
|
state: "active" // indicates there is an active session (set to 'closed' when done)
|
|
837
837
|
},
|
|
838
|
-
|
|
839
838
|
fabric_config: {
|
|
840
839
|
edge_write_token: edgeToken
|
|
841
840
|
}
|
|
@@ -1478,7 +1477,6 @@ exports.StreamInsertion = /*#__PURE__*/function () {
|
|
|
1478
1477
|
insertionInfo = {
|
|
1479
1478
|
duration_sec: 0 // Minimum of video and audio duration
|
|
1480
1479
|
};
|
|
1481
|
-
|
|
1482
1480
|
["video", "audio"].forEach(function (mt) {
|
|
1483
1481
|
var stream = offeringMeta.media_struct.streams[mt];
|
|
1484
1482
|
insertionInfo[mt] = {
|
|
@@ -1700,11 +1698,11 @@ exports.StreamInsertion = /*#__PURE__*/function () {
|
|
|
1700
1698
|
*/
|
|
1701
1699
|
exports.StreamConfig = /*#__PURE__*/function () {
|
|
1702
1700
|
var _ref22 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(_ref21) {
|
|
1703
|
-
var name, _ref21$customSettings, customSettings, probeMetadata, writeToken, _ref21$finalize, finalize, objectId, status, libraryId, probe, mainMeta, userConfig, parsedName, hostName, streamUrl, nodes, node, endpoint, probeUrl, lc, liveRecordingConfig, e;
|
|
1701
|
+
var name, _ref21$customSettings, customSettings, _ref21$customMetaValu, customMetaValues, probeMetadata, writeToken, _ref21$finalize, finalize, objectId, status, libraryId, probe, mainMeta, userConfig, parsedName, hostName, streamUrl, nodes, node, endpoint, probeUrl, lc, liveRecordingConfig, e;
|
|
1704
1702
|
return _regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
1705
1703
|
while (1) switch (_context11.prev = _context11.next) {
|
|
1706
1704
|
case 0:
|
|
1707
|
-
name = _ref21.name, _ref21$customSettings = _ref21.customSettings, customSettings = _ref21$customSettings === void 0 ? {} : _ref21$customSettings, probeMetadata = _ref21.probeMetadata, writeToken = _ref21.writeToken, _ref21$finalize = _ref21.finalize, finalize = _ref21$finalize === void 0 ? true : _ref21$finalize;
|
|
1705
|
+
name = _ref21.name, _ref21$customSettings = _ref21.customSettings, customSettings = _ref21$customSettings === void 0 ? {} : _ref21$customSettings, _ref21$customMetaValu = _ref21.customMetaValues, customMetaValues = _ref21$customMetaValu === void 0 ? {} : _ref21$customMetaValu, probeMetadata = _ref21.probeMetadata, writeToken = _ref21.writeToken, _ref21$finalize = _ref21.finalize, finalize = _ref21$finalize === void 0 ? true : _ref21$finalize;
|
|
1708
1706
|
objectId = name;
|
|
1709
1707
|
status = {
|
|
1710
1708
|
name: name
|
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
|
*
|