@eluvio/elv-client-js 4.0.84 → 4.0.85
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 +3 -3
- package/dist/ElvClient-node-min.js +3 -3
- package/dist/ElvFrameClient-min.js +1 -1
- package/dist/ElvWalletClient-min.js +3 -3
- package/dist/ElvWalletClient-node-min.js +3 -3
- package/dist/src/client/ContentAccess.js +2 -2
- package/dist/src/client/ContentManagement.js +33 -12
- package/dist/src/client/LiveConf.js +1 -1
- package/package.json +1 -1
- package/src/client/ContentAccess.js +2 -2
- package/src/client/ContentManagement.js +21 -6
- package/src/client/LiveConf.js +1 -1
|
@@ -1967,8 +1967,8 @@ exports.LatestVersionHashV2 = /*#__PURE__*/function () {
|
|
|
1967
1967
|
case 19:
|
|
1968
1968
|
_context28.prev = 19;
|
|
1969
1969
|
_context28.t6 = _context28["catch"](3);
|
|
1970
|
-
|
|
1971
|
-
throw
|
|
1970
|
+
_context28.t6.message = "Unable to determine latest version hash for ".concat(versionHash || objectId);
|
|
1971
|
+
throw _context28.t6;
|
|
1972
1972
|
case 23:
|
|
1973
1973
|
return _context28.abrupt("return", latestHash);
|
|
1974
1974
|
case 24:
|
|
@@ -1800,41 +1800,62 @@ exports.PublishContentVersion = /*#__PURE__*/function () {
|
|
|
1800
1800
|
break;
|
|
1801
1801
|
case 34:
|
|
1802
1802
|
if (!awaitCommitConfirmation) {
|
|
1803
|
-
_context21.next =
|
|
1803
|
+
_context21.next = 63;
|
|
1804
1804
|
break;
|
|
1805
1805
|
}
|
|
1806
1806
|
_pollingInterval = 500; // ms
|
|
1807
1807
|
tries = 20;
|
|
1808
1808
|
case 37:
|
|
1809
1809
|
if (!(tries > 0)) {
|
|
1810
|
-
_context21.next =
|
|
1810
|
+
_context21.next = 63;
|
|
1811
1811
|
break;
|
|
1812
1812
|
}
|
|
1813
|
-
|
|
1813
|
+
h = void 0;
|
|
1814
|
+
_context21.prev = 39;
|
|
1815
|
+
_context21.next = 42;
|
|
1814
1816
|
return this.LatestVersionHashV2({
|
|
1815
1817
|
objectId: objectId
|
|
1816
1818
|
});
|
|
1817
|
-
case
|
|
1819
|
+
case 42:
|
|
1818
1820
|
h = _context21.sent;
|
|
1819
|
-
if (!(h
|
|
1820
|
-
_context21.next =
|
|
1821
|
+
if (!(h === versionHash)) {
|
|
1822
|
+
_context21.next = 48;
|
|
1821
1823
|
break;
|
|
1822
1824
|
}
|
|
1823
1825
|
this.Log("Commit confirmed on fabric node: ".concat(versionHash));
|
|
1824
|
-
return _context21.abrupt("break",
|
|
1825
|
-
case
|
|
1826
|
-
|
|
1826
|
+
return _context21.abrupt("break", 63);
|
|
1827
|
+
case 48:
|
|
1828
|
+
tries--;
|
|
1829
|
+
_context21.next = 51;
|
|
1827
1830
|
return new Promise(function (resolve) {
|
|
1828
1831
|
return setTimeout(resolve, _pollingInterval);
|
|
1829
1832
|
});
|
|
1830
|
-
case
|
|
1833
|
+
case 51:
|
|
1834
|
+
_context21.next = 61;
|
|
1835
|
+
break;
|
|
1836
|
+
case 53:
|
|
1837
|
+
_context21.prev = 53;
|
|
1838
|
+
_context21.t0 = _context21["catch"](39);
|
|
1839
|
+
console.error(_context21.t0);
|
|
1840
|
+
if (!(_context21.t0.status !== 404)) {
|
|
1841
|
+
_context21.next = 58;
|
|
1842
|
+
break;
|
|
1843
|
+
}
|
|
1844
|
+
throw _context21.t0;
|
|
1845
|
+
case 58:
|
|
1846
|
+
tries--;
|
|
1847
|
+
_context21.next = 61;
|
|
1848
|
+
return new Promise(function (resolve) {
|
|
1849
|
+
return setTimeout(resolve, _pollingInterval);
|
|
1850
|
+
});
|
|
1851
|
+
case 61:
|
|
1831
1852
|
_context21.next = 37;
|
|
1832
1853
|
break;
|
|
1833
|
-
case
|
|
1854
|
+
case 63:
|
|
1834
1855
|
case "end":
|
|
1835
1856
|
return _context21.stop();
|
|
1836
1857
|
}
|
|
1837
|
-
}, _callee21, this);
|
|
1858
|
+
}, _callee21, this, [[39, 53]]);
|
|
1838
1859
|
}));
|
|
1839
1860
|
return function (_x20) {
|
|
1840
1861
|
return _ref38.apply(this, arguments);
|
|
@@ -424,7 +424,7 @@ var LiveConf = /*#__PURE__*/function () {
|
|
|
424
424
|
}
|
|
425
425
|
|
|
426
426
|
// If no audio streams specified in custom config, set up all the suitable audio streams in the probe
|
|
427
|
-
if (
|
|
427
|
+
if (!customSettings.audio) {
|
|
428
428
|
audioStreams = this.getAudioStreamsFromProbe();
|
|
429
429
|
}
|
|
430
430
|
return audioStreams;
|
package/package.json
CHANGED
|
@@ -1152,8 +1152,8 @@ exports.LatestVersionHashV2 = async function({objectId, versionHash}) {
|
|
|
1152
1152
|
latestHash = q.hash;
|
|
1153
1153
|
|
|
1154
1154
|
} catch(error) {
|
|
1155
|
-
|
|
1156
|
-
throw
|
|
1155
|
+
error.message = `Unable to determine latest version hash for ${versionHash || objectId}`;
|
|
1156
|
+
throw error;
|
|
1157
1157
|
}
|
|
1158
1158
|
return latestHash;
|
|
1159
1159
|
};
|
|
@@ -1054,13 +1054,28 @@ exports.PublishContentVersion = async function({objectId, versionHash, awaitComm
|
|
|
1054
1054
|
if(awaitCommitConfirmation) {
|
|
1055
1055
|
const pollingInterval = 500; // ms
|
|
1056
1056
|
let tries = 20;
|
|
1057
|
-
while
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1057
|
+
while(tries > 0) {
|
|
1058
|
+
let h;
|
|
1059
|
+
|
|
1060
|
+
try {
|
|
1061
|
+
h = await this.LatestVersionHashV2({objectId});
|
|
1062
|
+
|
|
1063
|
+
if(h === versionHash) {
|
|
1064
|
+
this.Log(`Commit confirmed on fabric node: ${versionHash}`);
|
|
1065
|
+
break;
|
|
1066
|
+
} else {
|
|
1067
|
+
tries--;
|
|
1068
|
+
await new Promise(resolve => setTimeout(resolve, pollingInterval));
|
|
1069
|
+
}
|
|
1070
|
+
} catch(error) {
|
|
1071
|
+
console.error(error);
|
|
1072
|
+
if(error.status !== 404) {
|
|
1073
|
+
throw error;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
tries--;
|
|
1077
|
+
await new Promise(resolve => setTimeout(resolve, pollingInterval));
|
|
1062
1078
|
}
|
|
1063
|
-
await new Promise(resolve => setTimeout(resolve, pollingInterval));
|
|
1064
1079
|
}
|
|
1065
1080
|
}
|
|
1066
1081
|
|
package/src/client/LiveConf.js
CHANGED
|
@@ -404,7 +404,7 @@ class LiveConf {
|
|
|
404
404
|
}
|
|
405
405
|
|
|
406
406
|
// If no audio streams specified in custom config, set up all the suitable audio streams in the probe
|
|
407
|
-
if (
|
|
407
|
+
if (!customSettings.audio) {
|
|
408
408
|
audioStreams = this.getAudioStreamsFromProbe();
|
|
409
409
|
}
|
|
410
410
|
|