@eluvio/elv-client-js 4.0.78 → 4.0.79
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 +5 -5
- package/dist/ElvClient-node-min.js +9 -9
- package/dist/ElvFrameClient-min.js +2 -2
- package/dist/ElvWalletClient-min.js +7 -7
- package/dist/ElvWalletClient-node-min.js +9 -9
- package/dist/src/FrameClient.js +1 -1
- package/dist/src/HttpClient.js +15 -7
- package/dist/src/UserProfileClient.js +36 -71
- package/dist/src/client/AccessGroups.js +39 -35
- package/dist/src/client/ContentAccess.js +1 -1
- package/dist/src/client/ContentManagement.js +100 -40
- package/dist/src/client/Contracts.js +268 -4
- package/dist/src/client/LiveStream.js +239 -210
- package/package.json +1 -1
- package/src/FrameClient.js +2 -1
- package/src/HttpClient.js +6 -0
- package/src/UserProfileClient.js +9 -38
- package/src/client/AccessGroups.js +19 -24
- package/src/client/ContentAccess.js +1 -1
- package/src/client/ContentManagement.js +44 -22
- package/src/client/Contracts.js +157 -2
- package/src/client/LiveStream.js +146 -128
- package/testScripts/TestAddTenantContractId.js +87 -0
|
@@ -341,7 +341,7 @@ var StreamGenerateOffering = /*#__PURE__*/function () {
|
|
|
341
341
|
*/
|
|
342
342
|
exports.StreamStatus = /*#__PURE__*/function () {
|
|
343
343
|
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref5) {
|
|
344
|
-
var name, _ref5$stopLro, stopLro, _ref5$showParams, showParams, conf, status, libraryId, mainMeta, fabURI,
|
|
344
|
+
var name, _ref5$stopLro, stopLro, _ref5$showParams, showParams, conf, status, libraryId, mainMeta, fabURI, _edgeWriteToken, edgeMeta, recordings, sequence, period, tlro, sinceLastFinalize, recording_period, insertions, i, insertionTimeSinceEpoch, state, lroStatus, playout_urls, objectId, playout_options, hls_clear_enabled, hls_aes128_enabled, hls_sample_aes_enabled, networkInfo, token, embed_net, embed_url;
|
|
345
345
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
346
346
|
while (1) switch (_context3.prev = _context3.next) {
|
|
347
347
|
case 0:
|
|
@@ -403,8 +403,8 @@ exports.StreamStatus = /*#__PURE__*/function () {
|
|
|
403
403
|
}
|
|
404
404
|
status.fabric_api = fabURI;
|
|
405
405
|
status.url = mainMeta.live_recording.recording_config.recording_params.origin_url;
|
|
406
|
-
|
|
407
|
-
if (
|
|
406
|
+
_edgeWriteToken = mainMeta.live_recording.fabric_config.edge_write_token;
|
|
407
|
+
if (_edgeWriteToken) {
|
|
408
408
|
_context3.next = 33;
|
|
409
409
|
break;
|
|
410
410
|
}
|
|
@@ -412,16 +412,16 @@ exports.StreamStatus = /*#__PURE__*/function () {
|
|
|
412
412
|
return _context3.abrupt("return", status);
|
|
413
413
|
case 33:
|
|
414
414
|
this.RecordWriteToken({
|
|
415
|
-
writeToken:
|
|
415
|
+
writeToken: _edgeWriteToken,
|
|
416
416
|
fabricNodeUrl: fabURI
|
|
417
417
|
});
|
|
418
|
-
status.edge_write_token =
|
|
419
|
-
status.stream_id =
|
|
418
|
+
status.edge_write_token = _edgeWriteToken;
|
|
419
|
+
status.stream_id = _edgeWriteToken; // By convention the stream ID is its write token
|
|
420
420
|
_context3.next = 38;
|
|
421
421
|
return this.ContentObjectMetadata({
|
|
422
422
|
libraryId: libraryId,
|
|
423
423
|
objectId: conf.objectId,
|
|
424
|
-
writeToken:
|
|
424
|
+
writeToken: _edgeWriteToken,
|
|
425
425
|
select: ["live_recording"]
|
|
426
426
|
});
|
|
427
427
|
case 38:
|
|
@@ -458,7 +458,7 @@ exports.StreamStatus = /*#__PURE__*/function () {
|
|
|
458
458
|
return this.FabricUrl({
|
|
459
459
|
libraryId: libraryId,
|
|
460
460
|
objectId: conf.objectId,
|
|
461
|
-
writeToken:
|
|
461
|
+
writeToken: _edgeWriteToken,
|
|
462
462
|
call: "live/status/" + tlro
|
|
463
463
|
});
|
|
464
464
|
case 54:
|
|
@@ -519,7 +519,7 @@ exports.StreamStatus = /*#__PURE__*/function () {
|
|
|
519
519
|
return this.FabricUrl({
|
|
520
520
|
libraryId: libraryId,
|
|
521
521
|
objectId: conf.objectId,
|
|
522
|
-
writeToken:
|
|
522
|
+
writeToken: _edgeWriteToken,
|
|
523
523
|
call: "live/stop/" + tlro
|
|
524
524
|
});
|
|
525
525
|
case 82:
|
|
@@ -933,8 +933,7 @@ exports.StreamStartOrStopOrReset = /*#__PURE__*/function () {
|
|
|
933
933
|
}();
|
|
934
934
|
|
|
935
935
|
/**
|
|
936
|
-
*
|
|
937
|
-
* Not implemented fully
|
|
936
|
+
* Close the edge write token and make the stream object inactive.
|
|
938
937
|
*
|
|
939
938
|
* @methodGroup Live Stream
|
|
940
939
|
* @namedParams
|
|
@@ -944,13 +943,13 @@ exports.StreamStartOrStopOrReset = /*#__PURE__*/function () {
|
|
|
944
943
|
*/
|
|
945
944
|
exports.StreamStopSession = /*#__PURE__*/function () {
|
|
946
945
|
var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(_ref11) {
|
|
947
|
-
var name, conf, objectId, libraryId, mainMeta, fabURI,
|
|
946
|
+
var name, conf, objectId, libraryId, mainMeta, fabURI, metaEdgeWriteToken, streamMetadata, status, _yield$this$EditConte, writeToken, newState, stopTime, finalizeMetadata, fin;
|
|
948
947
|
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
949
948
|
while (1) switch (_context6.prev = _context6.next) {
|
|
950
949
|
case 0:
|
|
951
950
|
name = _ref11.name;
|
|
952
951
|
_context6.prev = 1;
|
|
953
|
-
|
|
952
|
+
this.Log("Terminating stream session for: ".concat(name));
|
|
954
953
|
_context6.next = 5;
|
|
955
954
|
return this.LoadConf({
|
|
956
955
|
name: name
|
|
@@ -979,121 +978,108 @@ exports.StreamStopSession = /*#__PURE__*/function () {
|
|
|
979
978
|
this.SetNodes({
|
|
980
979
|
fabricURIs: [fabURI]
|
|
981
980
|
});
|
|
982
|
-
|
|
983
|
-
if (
|
|
981
|
+
metaEdgeWriteToken = mainMeta.live_recording.fabric_config.edge_write_token;
|
|
982
|
+
if (metaEdgeWriteToken) {
|
|
984
983
|
_context6.next = 19;
|
|
985
984
|
break;
|
|
986
985
|
}
|
|
987
986
|
return _context6.abrupt("return", {
|
|
988
987
|
state: "inactive",
|
|
989
|
-
error: "
|
|
988
|
+
error: "The stream is not active"
|
|
990
989
|
});
|
|
991
990
|
case 19:
|
|
992
|
-
_context6.
|
|
991
|
+
_context6.prev = 19;
|
|
992
|
+
_context6.next = 22;
|
|
993
993
|
return this.ContentObjectMetadata({
|
|
994
994
|
libraryId: libraryId,
|
|
995
995
|
objectId: objectId,
|
|
996
|
-
writeToken:
|
|
996
|
+
writeToken: metaEdgeWriteToken
|
|
997
997
|
});
|
|
998
|
-
case
|
|
999
|
-
|
|
1000
|
-
_context6.next =
|
|
998
|
+
case 22:
|
|
999
|
+
streamMetadata = _context6.sent;
|
|
1000
|
+
_context6.next = 25;
|
|
1001
1001
|
return this.StreamStatus({
|
|
1002
1002
|
name: name
|
|
1003
1003
|
});
|
|
1004
|
-
case
|
|
1004
|
+
case 25:
|
|
1005
1005
|
status = _context6.sent;
|
|
1006
|
-
if (!(status.state
|
|
1007
|
-
_context6.next =
|
|
1006
|
+
if (!(status.state !== "stopped")) {
|
|
1007
|
+
_context6.next = 28;
|
|
1008
1008
|
break;
|
|
1009
1009
|
}
|
|
1010
|
-
|
|
1011
|
-
|
|
1010
|
+
return _context6.abrupt("return", {
|
|
1011
|
+
state: status.state,
|
|
1012
|
+
error: "The stream must be stopped before terminating"
|
|
1013
|
+
});
|
|
1014
|
+
case 28:
|
|
1012
1015
|
_context6.next = 30;
|
|
1013
|
-
return this.
|
|
1014
|
-
libraryId:
|
|
1015
|
-
|
|
1016
|
-
writeToken: status.edge_write_token,
|
|
1017
|
-
method: "/live/stop/" + status.tlro,
|
|
1018
|
-
constant: false
|
|
1016
|
+
return this.DeleteWriteToken({
|
|
1017
|
+
libraryId: libraryId,
|
|
1018
|
+
writeToken: metaEdgeWriteToken
|
|
1019
1019
|
});
|
|
1020
1020
|
case 30:
|
|
1021
|
-
_context6.next =
|
|
1021
|
+
_context6.next = 35;
|
|
1022
1022
|
break;
|
|
1023
1023
|
case 32:
|
|
1024
1024
|
_context6.prev = 32;
|
|
1025
|
-
_context6.t0 = _context6["catch"](
|
|
1026
|
-
|
|
1027
|
-
// Wait until LRO is terminated
|
|
1028
|
-
tries = 10;
|
|
1025
|
+
_context6.t0 = _context6["catch"](19);
|
|
1026
|
+
this.Log("Unable to retrieve metadata for edge write token ".concat(edgeWriteToken));
|
|
1029
1027
|
case 35:
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
console.log("Wait to terminate - ", status.state);
|
|
1035
|
-
_context6.next = 39;
|
|
1036
|
-
return Sleep(1000);
|
|
1037
|
-
case 39:
|
|
1038
|
-
_context6.next = 41;
|
|
1039
|
-
return this.StreamStatus({
|
|
1040
|
-
name: name
|
|
1028
|
+
_context6.next = 37;
|
|
1029
|
+
return this.EditContentObject({
|
|
1030
|
+
libraryId: libraryId,
|
|
1031
|
+
objectId: objectId
|
|
1041
1032
|
});
|
|
1042
|
-
case
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
state: "terminated",
|
|
1061
|
-
recording_stop_time: edgeMeta.recording_stop_time
|
|
1033
|
+
case 37:
|
|
1034
|
+
_yield$this$EditConte = _context6.sent;
|
|
1035
|
+
writeToken = _yield$this$EditConte.writeToken;
|
|
1036
|
+
// Set stop time and inactive state
|
|
1037
|
+
newState = "inactive";
|
|
1038
|
+
stopTime = Math.floor(new Date().getTime() / 1000);
|
|
1039
|
+
finalizeMetadata = {
|
|
1040
|
+
live_recording: {
|
|
1041
|
+
status: {
|
|
1042
|
+
edge_write_token: "",
|
|
1043
|
+
state: newState,
|
|
1044
|
+
recording_stop_time: stopTime
|
|
1045
|
+
},
|
|
1046
|
+
fabric_config: {
|
|
1047
|
+
edge_write_token: ""
|
|
1048
|
+
}
|
|
1049
|
+
},
|
|
1050
|
+
recording_stop_time: stopTime
|
|
1062
1051
|
};
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
return this.ReplaceMetadata({
|
|
1052
|
+
_context6.next = 44;
|
|
1053
|
+
return this.MergeMetadata({
|
|
1066
1054
|
libraryId: libraryId,
|
|
1067
1055
|
objectId: objectId,
|
|
1068
|
-
writeToken:
|
|
1069
|
-
metadata:
|
|
1056
|
+
writeToken: writeToken,
|
|
1057
|
+
metadata: finalizeMetadata
|
|
1070
1058
|
});
|
|
1071
|
-
case
|
|
1072
|
-
_context6.next =
|
|
1059
|
+
case 44:
|
|
1060
|
+
_context6.next = 46;
|
|
1073
1061
|
return this.FinalizeContentObject({
|
|
1074
1062
|
libraryId: libraryId,
|
|
1075
1063
|
objectId: objectId,
|
|
1076
|
-
writeToken:
|
|
1077
|
-
commitMessage: "
|
|
1078
|
-
publish: false // Don't publish this version because it is not currently useful
|
|
1064
|
+
writeToken: writeToken,
|
|
1065
|
+
commitMessage: "Deactivate live stream - stop time ".concat(stopTime)
|
|
1079
1066
|
});
|
|
1080
|
-
case
|
|
1067
|
+
case 46:
|
|
1081
1068
|
fin = _context6.sent;
|
|
1082
1069
|
return _context6.abrupt("return", {
|
|
1083
1070
|
fin: fin,
|
|
1084
1071
|
name: name,
|
|
1085
|
-
|
|
1086
|
-
state: "terminated"
|
|
1072
|
+
state: newState
|
|
1087
1073
|
});
|
|
1088
|
-
case
|
|
1089
|
-
_context6.prev =
|
|
1074
|
+
case 50:
|
|
1075
|
+
_context6.prev = 50;
|
|
1090
1076
|
_context6.t1 = _context6["catch"](1);
|
|
1091
1077
|
console.error(_context6.t1);
|
|
1092
|
-
case
|
|
1078
|
+
case 53:
|
|
1093
1079
|
case "end":
|
|
1094
1080
|
return _context6.stop();
|
|
1095
1081
|
}
|
|
1096
|
-
}, _callee6, this, [[1,
|
|
1082
|
+
}, _callee6, this, [[1, 50], [19, 32]]);
|
|
1097
1083
|
}));
|
|
1098
1084
|
return function (_x6) {
|
|
1099
1085
|
return _ref12.apply(this, arguments);
|
|
@@ -1793,135 +1779,178 @@ exports.StreamConfig = /*#__PURE__*/function () {
|
|
|
1793
1779
|
}();
|
|
1794
1780
|
|
|
1795
1781
|
/**
|
|
1796
|
-
*
|
|
1782
|
+
* List the pre-allocated URLs for a site
|
|
1797
1783
|
*
|
|
1798
1784
|
* @methodGroup Live Stream
|
|
1799
1785
|
* @namedParams
|
|
1800
|
-
* @param {string}
|
|
1786
|
+
* @param {string=} - ID of the live stream site object
|
|
1801
1787
|
*
|
|
1802
|
-
* @return {Promise<Object>} - The
|
|
1788
|
+
* @return {Promise<Object>} - The list of stream URLs
|
|
1803
1789
|
*/
|
|
1804
|
-
exports.
|
|
1805
|
-
var
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1790
|
+
exports.StreamListUrls = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13() {
|
|
1791
|
+
var _this = this;
|
|
1792
|
+
var _ref24,
|
|
1793
|
+
siteId,
|
|
1794
|
+
STATUS_MAP,
|
|
1795
|
+
tenantContractId,
|
|
1796
|
+
streamMetadata,
|
|
1797
|
+
activeUrlMap,
|
|
1798
|
+
streamUrlStatus,
|
|
1799
|
+
streamUrls,
|
|
1800
|
+
_args13 = arguments;
|
|
1801
|
+
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
1802
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
1803
|
+
case 0:
|
|
1804
|
+
_ref24 = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {}, siteId = _ref24.siteId;
|
|
1805
|
+
_context13.prev = 1;
|
|
1806
|
+
STATUS_MAP = {
|
|
1807
|
+
UNCONFIGURED: "unconfigured",
|
|
1808
|
+
UNINITIALIZED: "uninitialized",
|
|
1809
|
+
INACTIVE: "inactive",
|
|
1810
|
+
STOPPED: "stopped",
|
|
1811
|
+
STARTING: "starting",
|
|
1812
|
+
RUNNING: "running",
|
|
1813
|
+
STALLED: "stalled"
|
|
1814
|
+
};
|
|
1815
|
+
if (siteId) {
|
|
1816
|
+
_context13.next = 12;
|
|
1817
|
+
break;
|
|
1818
|
+
}
|
|
1819
|
+
_context13.next = 6;
|
|
1820
|
+
return this.userProfileClient.TenantContractId();
|
|
1821
|
+
case 6:
|
|
1822
|
+
tenantContractId = _context13.sent;
|
|
1823
|
+
if (tenantContractId) {
|
|
1824
|
+
_context13.next = 9;
|
|
1825
|
+
break;
|
|
1826
|
+
}
|
|
1827
|
+
throw Error("No tenant contract ID configured");
|
|
1828
|
+
case 9:
|
|
1829
|
+
_context13.next = 11;
|
|
1830
|
+
return this.ContentObjectMetadata({
|
|
1831
|
+
libraryId: tenantContractId.replace("iten", "ilib"),
|
|
1832
|
+
objectId: tenantContractId.replace("iten", "iq__"),
|
|
1833
|
+
metadataSubtree: "public/sites/live_streams"
|
|
1834
|
+
});
|
|
1835
|
+
case 11:
|
|
1836
|
+
siteId = _context13.sent;
|
|
1837
|
+
case 12:
|
|
1838
|
+
_context13.t0 = this;
|
|
1839
|
+
_context13.next = 15;
|
|
1840
|
+
return this.ContentObjectLibraryId({
|
|
1841
|
+
objectId: siteId
|
|
1842
|
+
});
|
|
1843
|
+
case 15:
|
|
1844
|
+
_context13.t1 = _context13.sent;
|
|
1845
|
+
_context13.t2 = siteId;
|
|
1846
|
+
_context13.t3 = {
|
|
1847
|
+
libraryId: _context13.t1,
|
|
1848
|
+
objectId: _context13.t2,
|
|
1849
|
+
metadataSubtree: "public/asset_metadata/live_streams",
|
|
1850
|
+
resolveLinks: true,
|
|
1851
|
+
resolveIgnoreErrors: true
|
|
1852
|
+
};
|
|
1853
|
+
_context13.next = 20;
|
|
1854
|
+
return _context13.t0.ContentObjectMetadata.call(_context13.t0, _context13.t3);
|
|
1855
|
+
case 20:
|
|
1856
|
+
streamMetadata = _context13.sent;
|
|
1857
|
+
activeUrlMap = {};
|
|
1858
|
+
_context13.next = 24;
|
|
1859
|
+
return this.utils.LimitedMap(10, Object.keys(streamMetadata || {}), /*#__PURE__*/function () {
|
|
1860
|
+
var _ref25 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(slug) {
|
|
1861
|
+
var stream, versionHash, objectId, libraryId, status, streamMeta, url, isActive;
|
|
1862
|
+
return _regeneratorRuntime.wrap(function _callee12$(_context12) {
|
|
1863
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
1864
|
+
case 0:
|
|
1865
|
+
stream = streamMetadata[slug];
|
|
1866
|
+
if (stream && stream.sources && stream.sources["default"] && stream.sources["default"]["."] && stream.sources["default"]["."].container || ((stream["/"] || "").match(/^\/?qfab\/([\w]+)\/?.+/) || [])[1]) {
|
|
1867
|
+
versionHash = stream.sources["default"]["."].container || ((stream["/"] || "").match(/^\/?qfab\/([\w]+)\/?.+/) || [])[1];
|
|
1868
|
+
}
|
|
1869
|
+
if (!versionHash) {
|
|
1870
|
+
_context12.next = 16;
|
|
1871
|
+
break;
|
|
1872
|
+
}
|
|
1873
|
+
objectId = _this.utils.DecodeVersionHash(versionHash).objectId;
|
|
1874
|
+
_context12.next = 6;
|
|
1875
|
+
return _this.ContentObjectLibraryId({
|
|
1876
|
+
objectId: objectId
|
|
1877
|
+
});
|
|
1878
|
+
case 6:
|
|
1879
|
+
libraryId = _context12.sent;
|
|
1880
|
+
_context12.next = 9;
|
|
1881
|
+
return _this.StreamStatus({
|
|
1882
|
+
name: objectId
|
|
1883
|
+
});
|
|
1884
|
+
case 9:
|
|
1885
|
+
status = _context12.sent;
|
|
1886
|
+
_context12.next = 12;
|
|
1887
|
+
return _this.ContentObjectMetadata({
|
|
1888
|
+
objectId: objectId,
|
|
1889
|
+
libraryId: libraryId,
|
|
1890
|
+
select: ["live_recording_config/reference_url",
|
|
1891
|
+
// live_recording_config/url is the old path
|
|
1892
|
+
"live_recording_config/url"]
|
|
1893
|
+
});
|
|
1894
|
+
case 12:
|
|
1895
|
+
streamMeta = _context12.sent;
|
|
1896
|
+
url = streamMeta.live_recording_config.reference_url || streamMeta.live_recording_config.url;
|
|
1897
|
+
isActive = [STATUS_MAP.STARTING, STATUS_MAP.RUNNING, STATUS_MAP.STALLED, STATUS_MAP.STOPPED].includes(status.state);
|
|
1898
|
+
if (url && isActive) {
|
|
1899
|
+
activeUrlMap[url] = true;
|
|
1900
|
+
}
|
|
1901
|
+
case 16:
|
|
1902
|
+
case "end":
|
|
1903
|
+
return _context12.stop();
|
|
1904
|
+
}
|
|
1905
|
+
}, _callee12);
|
|
1906
|
+
}));
|
|
1907
|
+
return function (_x12) {
|
|
1908
|
+
return _ref25.apply(this, arguments);
|
|
1888
1909
|
};
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1910
|
+
}());
|
|
1911
|
+
case 24:
|
|
1912
|
+
streamUrlStatus = {};
|
|
1913
|
+
_context13.t4 = this;
|
|
1914
|
+
_context13.next = 28;
|
|
1915
|
+
return this.ContentObjectLibraryId({
|
|
1916
|
+
objectId: siteId
|
|
1917
|
+
});
|
|
1918
|
+
case 28:
|
|
1919
|
+
_context13.t5 = _context13.sent;
|
|
1920
|
+
_context13.t6 = siteId;
|
|
1921
|
+
_context13.t7 = {
|
|
1922
|
+
libraryId: _context13.t5,
|
|
1923
|
+
objectId: _context13.t6,
|
|
1924
|
+
metadataSubtree: "/live_stream_urls",
|
|
1925
|
+
resolveLinks: true,
|
|
1926
|
+
resolveIgnoreErrors: true
|
|
1927
|
+
};
|
|
1928
|
+
_context13.next = 33;
|
|
1929
|
+
return _context13.t4.ContentObjectMetadata.call(_context13.t4, _context13.t7);
|
|
1930
|
+
case 33:
|
|
1931
|
+
streamUrls = _context13.sent;
|
|
1932
|
+
if (streamUrls) {
|
|
1933
|
+
_context13.next = 36;
|
|
1934
|
+
break;
|
|
1935
|
+
}
|
|
1936
|
+
throw Error("No pre-allocated URLs configured");
|
|
1937
|
+
case 36:
|
|
1938
|
+
Object.keys(streamUrls || {}).forEach(function (protocol) {
|
|
1939
|
+
streamUrlStatus[protocol] = streamUrls[protocol].map(function (url) {
|
|
1940
|
+
return {
|
|
1941
|
+
url: url,
|
|
1942
|
+
active: activeUrlMap[url] || false
|
|
1943
|
+
};
|
|
1913
1944
|
});
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
};
|
|
1927
|
-
}();
|
|
1945
|
+
});
|
|
1946
|
+
return _context13.abrupt("return", streamUrlStatus);
|
|
1947
|
+
case 40:
|
|
1948
|
+
_context13.prev = 40;
|
|
1949
|
+
_context13.t8 = _context13["catch"](1);
|
|
1950
|
+
console.error(_context13.t8);
|
|
1951
|
+
case 43:
|
|
1952
|
+
case "end":
|
|
1953
|
+
return _context13.stop();
|
|
1954
|
+
}
|
|
1955
|
+
}, _callee13, this, [[1, 40]]);
|
|
1956
|
+
}));
|
package/package.json
CHANGED
package/src/FrameClient.js
CHANGED
|
@@ -387,6 +387,7 @@ class FrameClient {
|
|
|
387
387
|
"DeleteMetadata",
|
|
388
388
|
"DeleteNTPInstance",
|
|
389
389
|
"DeletePart",
|
|
390
|
+
"DeleteWriteToken",
|
|
390
391
|
"DeployContract",
|
|
391
392
|
"Download",
|
|
392
393
|
"DownloadEncrypted",
|
|
@@ -476,9 +477,9 @@ class FrameClient {
|
|
|
476
477
|
"StartABRMezzanineJobs",
|
|
477
478
|
"StreamConfig",
|
|
478
479
|
"StreamCreate",
|
|
479
|
-
"StreamDeactivate",
|
|
480
480
|
"StreamInitialize",
|
|
481
481
|
"StreamInsertion",
|
|
482
|
+
"StreamListUrls",
|
|
482
483
|
"StreamStatus",
|
|
483
484
|
"StreamStartOrStopOrReset",
|
|
484
485
|
"StreamStopSession",
|
package/src/HttpClient.js
CHANGED
|
@@ -29,6 +29,12 @@ class HttpClient {
|
|
|
29
29
|
this.draftURIs[writeToken] = new URI(nodeUrlStr);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
ClearWriteToken({writeToken}) {
|
|
33
|
+
if(Object.hasOwn(this.draftURIs, writeToken)) {
|
|
34
|
+
delete this.draftURIs[writeToken];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
32
38
|
RequestHeaders(bodyType, headers={}) {
|
|
33
39
|
if(!headers.Accept) {
|
|
34
40
|
headers["Accept"] = "application/json";
|