@supraio/client-daemon-js 0.0.0-mznacl.292 → 0.0.0-mznacl.294

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/daemon.html CHANGED
@@ -4,6 +4,6 @@
4
4
  <title>Supra daemon</title>
5
5
  </head>
6
6
  <body>
7
- <script type="text/javascript" src="daemon.js?v=0.0.0-mznacl.292"></script>
7
+ <script type="text/javascript" src="daemon.js?v=0.0.0-mznacl.294"></script>
8
8
  </body>
9
9
  </html>
package/daemon.js CHANGED
@@ -17011,17 +17011,25 @@
17011
17011
  MessageSender2.prototype.sendWithoutResult = function(message) {
17012
17012
  this.naclModuleEl.postMessage((0, messageConvertor_1.convertMessageToArrayBuffer)(message));
17013
17013
  };
17014
- MessageSender2.prototype.sendWithResult = function(message, resultMessageType) {
17015
- return __awaiter(this, void 0, void 0, function() {
17014
+ MessageSender2.prototype.sendWithResult = function(message_1, resultMessageType_1) {
17015
+ return __awaiter(this, arguments, void 0, function(message, resultMessageType, timeoutMs) {
17016
17016
  var arrayBuffer;
17017
17017
  var _this = this;
17018
+ if (timeoutMs === void 0) {
17019
+ timeoutMs = 1e3;
17020
+ }
17018
17021
  return __generator(this, function(_a) {
17019
17022
  arrayBuffer = (0, messageConvertor_1.convertMessageToArrayBuffer)(message);
17020
- return [2, new Promise(function(resolve) {
17023
+ return [2, new Promise(function(resolve, reject) {
17024
+ var timeoutHandler = setTimeout(function() {
17025
+ _this.messageListeners.delete(listener);
17026
+ reject(new Error("Timeout"));
17027
+ }, timeoutMs);
17021
17028
  var listener = function(message2) {
17022
17029
  if (message2.type !== resultMessageType) {
17023
17030
  return;
17024
17031
  }
17032
+ clearTimeout(timeoutHandler);
17025
17033
  _this.messageListeners.delete(listener);
17026
17034
  resolve(message2);
17027
17035
  };
@@ -17435,12 +17443,68 @@
17435
17443
  }
17436
17444
  });
17437
17445
 
17446
+ // node_modules/@signageos/nacl-decoder/dist/NaClDecoder/videoDecoder.js
17447
+ var require_videoDecoder = __commonJS({
17448
+ "node_modules/@signageos/nacl-decoder/dist/NaClDecoder/videoDecoder.js"(exports) {
17449
+ "use strict";
17450
+ Object.defineProperty(exports, "__esModule", { value: true });
17451
+ exports.ResultStatus = exports.GLTexture = exports.HWAcceleration = exports.VideoProfile = void 0;
17452
+ var VideoProfile;
17453
+ (function(VideoProfile2) {
17454
+ VideoProfile2[VideoProfile2["H264Baseline"] = 0] = "H264Baseline";
17455
+ VideoProfile2[VideoProfile2["H264Main"] = 1] = "H264Main";
17456
+ VideoProfile2[VideoProfile2["H264Extended"] = 2] = "H264Extended";
17457
+ VideoProfile2[VideoProfile2["H264High"] = 3] = "H264High";
17458
+ VideoProfile2[VideoProfile2["H264High10Profile"] = 4] = "H264High10Profile";
17459
+ VideoProfile2[VideoProfile2["H264High422Profile"] = 5] = "H264High422Profile";
17460
+ VideoProfile2[VideoProfile2["H264High444PredictiveProfile"] = 6] = "H264High444PredictiveProfile";
17461
+ VideoProfile2[VideoProfile2["H264ScalableBaseline"] = 7] = "H264ScalableBaseline";
17462
+ VideoProfile2[VideoProfile2["H264ScalableHigh"] = 8] = "H264ScalableHigh";
17463
+ VideoProfile2[VideoProfile2["H264StereoHigh"] = 9] = "H264StereoHigh";
17464
+ VideoProfile2[VideoProfile2["H264MultiviewHigh"] = 10] = "H264MultiviewHigh";
17465
+ VideoProfile2[VideoProfile2["VP8Any"] = 11] = "VP8Any";
17466
+ VideoProfile2[VideoProfile2["VP9Any"] = 12] = "VP9Any";
17467
+ VideoProfile2[VideoProfile2["Max"] = 12] = "Max";
17468
+ })(VideoProfile || (exports.VideoProfile = VideoProfile = {}));
17469
+ var HWAcceleration;
17470
+ (function(HWAcceleration2) {
17471
+ HWAcceleration2[HWAcceleration2["Only"] = 0] = "Only";
17472
+ HWAcceleration2[HWAcceleration2["WithFallback"] = 1] = "WithFallback";
17473
+ HWAcceleration2[HWAcceleration2["None"] = 2] = "None";
17474
+ HWAcceleration2[HWAcceleration2["Last"] = 2] = "Last";
17475
+ })(HWAcceleration || (exports.HWAcceleration = HWAcceleration = {}));
17476
+ var GLTexture;
17477
+ (function(GLTexture2) {
17478
+ GLTexture2[GLTexture2["Texture2D"] = 3553] = "Texture2D";
17479
+ GLTexture2[GLTexture2["TextureRectangleARB"] = 34037] = "TextureRectangleARB";
17480
+ GLTexture2[GLTexture2["TextureExternal"] = 36197] = "TextureExternal";
17481
+ })(GLTexture || (exports.GLTexture = GLTexture = {}));
17482
+ var ResultStatus;
17483
+ (function(ResultStatus2) {
17484
+ ResultStatus2[ResultStatus2["Ok"] = 0] = "Ok";
17485
+ ResultStatus2[ResultStatus2["OkCompletionPending"] = -1] = "OkCompletionPending";
17486
+ ResultStatus2[ResultStatus2["ErrorFailed"] = -2] = "ErrorFailed";
17487
+ ResultStatus2[ResultStatus2["ErrorAborted"] = -3] = "ErrorAborted";
17488
+ ResultStatus2[ResultStatus2["ErrorBadArgument"] = -4] = "ErrorBadArgument";
17489
+ ResultStatus2[ResultStatus2["ErrorBadResource"] = -5] = "ErrorBadResource";
17490
+ ResultStatus2[ResultStatus2["ErrorNoInit"] = -6] = "ErrorNoInit";
17491
+ ResultStatus2[ResultStatus2["ErrorNoAccess"] = -7] = "ErrorNoAccess";
17492
+ ResultStatus2[ResultStatus2["ErrorNoMemory"] = -8] = "ErrorNoMemory";
17493
+ ResultStatus2[ResultStatus2["ErrorNoSpace"] = -9] = "ErrorNoSpace";
17494
+ ResultStatus2[ResultStatus2["ErrorNoQuota"] = -10] = "ErrorNoQuota";
17495
+ ResultStatus2[ResultStatus2["ErrorInProgress"] = -11] = "ErrorInProgress";
17496
+ ResultStatus2[ResultStatus2["ErrorNotSupported"] = -12] = "ErrorNotSupported";
17497
+ ResultStatus2[ResultStatus2["ErrorBlocksMainThread"] = -13] = "ErrorBlocksMainThread";
17498
+ })(ResultStatus || (exports.ResultStatus = ResultStatus = {}));
17499
+ }
17500
+ });
17501
+
17438
17502
  // node_modules/@signageos/nacl-decoder/dist/index.js
17439
17503
  var require_dist = __commonJS({
17440
17504
  "node_modules/@signageos/nacl-decoder/dist/index.js"(exports) {
17441
17505
  "use strict";
17442
17506
  Object.defineProperty(exports, "__esModule", { value: true });
17443
- exports.NaClDecoder = void 0;
17507
+ exports.VideoProfile = exports.ResultStatus = exports.HWAcceleration = exports.NaClDecoder = void 0;
17444
17508
  exports.isNaClSupported = isNaClSupported2;
17445
17509
  exports.createNaClDecoder = createNaClDecoder2;
17446
17510
  var messageListeners_1 = require_messageListeners();
@@ -17451,6 +17515,16 @@
17451
17515
  Object.defineProperty(exports, "NaClDecoder", { enumerable: true, get: function() {
17452
17516
  return naclDecoder_1.NaClDecoder;
17453
17517
  } });
17518
+ var videoDecoder_1 = require_videoDecoder();
17519
+ Object.defineProperty(exports, "HWAcceleration", { enumerable: true, get: function() {
17520
+ return videoDecoder_1.HWAcceleration;
17521
+ } });
17522
+ Object.defineProperty(exports, "ResultStatus", { enumerable: true, get: function() {
17523
+ return videoDecoder_1.ResultStatus;
17524
+ } });
17525
+ Object.defineProperty(exports, "VideoProfile", { enumerable: true, get: function() {
17526
+ return videoDecoder_1.VideoProfile;
17527
+ } });
17454
17528
  function isNaClSupported2() {
17455
17529
  return (
17456
17530
  // Keyed by mime type supported in older versions of Chrome that uses NaCl.
@@ -17798,7 +17872,7 @@
17798
17872
  }
17799
17873
 
17800
17874
  // daemon/plain.ts
17801
- var DAEMON_JS_URL = "supra-client-daemon.js?v=0.0.0-mznacl.292";
17875
+ var DAEMON_JS_URL = "supra-client-daemon.js?v=0.0.0-mznacl.294";
17802
17876
  async function startPlainDaemon() {
17803
17877
  const fs = await initBrowserFS();
17804
17878
  window.fs = fs;
@@ -17809,7 +17883,7 @@
17809
17883
  }
17810
17884
 
17811
17885
  // daemon/wasm.ts
17812
- var DAEMON_WASM_URL = "supra-client-daemon.wasm?v=0.0.0-mznacl.292";
17886
+ var DAEMON_WASM_URL = "supra-client-daemon.wasm?v=0.0.0-mznacl.294";
17813
17887
  async function startWasmDaemon() {
17814
17888
  await initGoEnvironment();
17815
17889
  await startGoDaemon();