@supraio/client-daemon-js 0.0.0-mznacl.293 → 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/sdk.js CHANGED
@@ -17018,17 +17018,25 @@ var require_messageSender = __commonJS({
17018
17018
  MessageSender2.prototype.sendWithoutResult = function(message) {
17019
17019
  this.naclModuleEl.postMessage((0, messageConvertor_1.convertMessageToArrayBuffer)(message));
17020
17020
  };
17021
- MessageSender2.prototype.sendWithResult = function(message, resultMessageType) {
17022
- return __awaiter(this, void 0, void 0, function() {
17021
+ MessageSender2.prototype.sendWithResult = function(message_1, resultMessageType_1) {
17022
+ return __awaiter(this, arguments, void 0, function(message, resultMessageType, timeoutMs) {
17023
17023
  var arrayBuffer;
17024
17024
  var _this = this;
17025
+ if (timeoutMs === void 0) {
17026
+ timeoutMs = 1e3;
17027
+ }
17025
17028
  return __generator(this, function(_a) {
17026
17029
  arrayBuffer = (0, messageConvertor_1.convertMessageToArrayBuffer)(message);
17027
- return [2, new Promise(function(resolve) {
17030
+ return [2, new Promise(function(resolve, reject) {
17031
+ var timeoutHandler = setTimeout(function() {
17032
+ _this.messageListeners.delete(listener);
17033
+ reject(new Error("Timeout"));
17034
+ }, timeoutMs);
17028
17035
  var listener = function(message2) {
17029
17036
  if (message2.type !== resultMessageType) {
17030
17037
  return;
17031
17038
  }
17039
+ clearTimeout(timeoutHandler);
17032
17040
  _this.messageListeners.delete(listener);
17033
17041
  resolve(message2);
17034
17042
  };
@@ -17442,12 +17450,68 @@ var require_naclDecoder = __commonJS({
17442
17450
  }
17443
17451
  });
17444
17452
 
17453
+ // node_modules/@signageos/nacl-decoder/dist/NaClDecoder/videoDecoder.js
17454
+ var require_videoDecoder = __commonJS({
17455
+ "node_modules/@signageos/nacl-decoder/dist/NaClDecoder/videoDecoder.js"(exports) {
17456
+ "use strict";
17457
+ Object.defineProperty(exports, "__esModule", { value: true });
17458
+ exports.ResultStatus = exports.GLTexture = exports.HWAcceleration = exports.VideoProfile = void 0;
17459
+ var VideoProfile;
17460
+ (function(VideoProfile2) {
17461
+ VideoProfile2[VideoProfile2["H264Baseline"] = 0] = "H264Baseline";
17462
+ VideoProfile2[VideoProfile2["H264Main"] = 1] = "H264Main";
17463
+ VideoProfile2[VideoProfile2["H264Extended"] = 2] = "H264Extended";
17464
+ VideoProfile2[VideoProfile2["H264High"] = 3] = "H264High";
17465
+ VideoProfile2[VideoProfile2["H264High10Profile"] = 4] = "H264High10Profile";
17466
+ VideoProfile2[VideoProfile2["H264High422Profile"] = 5] = "H264High422Profile";
17467
+ VideoProfile2[VideoProfile2["H264High444PredictiveProfile"] = 6] = "H264High444PredictiveProfile";
17468
+ VideoProfile2[VideoProfile2["H264ScalableBaseline"] = 7] = "H264ScalableBaseline";
17469
+ VideoProfile2[VideoProfile2["H264ScalableHigh"] = 8] = "H264ScalableHigh";
17470
+ VideoProfile2[VideoProfile2["H264StereoHigh"] = 9] = "H264StereoHigh";
17471
+ VideoProfile2[VideoProfile2["H264MultiviewHigh"] = 10] = "H264MultiviewHigh";
17472
+ VideoProfile2[VideoProfile2["VP8Any"] = 11] = "VP8Any";
17473
+ VideoProfile2[VideoProfile2["VP9Any"] = 12] = "VP9Any";
17474
+ VideoProfile2[VideoProfile2["Max"] = 12] = "Max";
17475
+ })(VideoProfile || (exports.VideoProfile = VideoProfile = {}));
17476
+ var HWAcceleration;
17477
+ (function(HWAcceleration2) {
17478
+ HWAcceleration2[HWAcceleration2["Only"] = 0] = "Only";
17479
+ HWAcceleration2[HWAcceleration2["WithFallback"] = 1] = "WithFallback";
17480
+ HWAcceleration2[HWAcceleration2["None"] = 2] = "None";
17481
+ HWAcceleration2[HWAcceleration2["Last"] = 2] = "Last";
17482
+ })(HWAcceleration || (exports.HWAcceleration = HWAcceleration = {}));
17483
+ var GLTexture;
17484
+ (function(GLTexture2) {
17485
+ GLTexture2[GLTexture2["Texture2D"] = 3553] = "Texture2D";
17486
+ GLTexture2[GLTexture2["TextureRectangleARB"] = 34037] = "TextureRectangleARB";
17487
+ GLTexture2[GLTexture2["TextureExternal"] = 36197] = "TextureExternal";
17488
+ })(GLTexture || (exports.GLTexture = GLTexture = {}));
17489
+ var ResultStatus;
17490
+ (function(ResultStatus2) {
17491
+ ResultStatus2[ResultStatus2["Ok"] = 0] = "Ok";
17492
+ ResultStatus2[ResultStatus2["OkCompletionPending"] = -1] = "OkCompletionPending";
17493
+ ResultStatus2[ResultStatus2["ErrorFailed"] = -2] = "ErrorFailed";
17494
+ ResultStatus2[ResultStatus2["ErrorAborted"] = -3] = "ErrorAborted";
17495
+ ResultStatus2[ResultStatus2["ErrorBadArgument"] = -4] = "ErrorBadArgument";
17496
+ ResultStatus2[ResultStatus2["ErrorBadResource"] = -5] = "ErrorBadResource";
17497
+ ResultStatus2[ResultStatus2["ErrorNoInit"] = -6] = "ErrorNoInit";
17498
+ ResultStatus2[ResultStatus2["ErrorNoAccess"] = -7] = "ErrorNoAccess";
17499
+ ResultStatus2[ResultStatus2["ErrorNoMemory"] = -8] = "ErrorNoMemory";
17500
+ ResultStatus2[ResultStatus2["ErrorNoSpace"] = -9] = "ErrorNoSpace";
17501
+ ResultStatus2[ResultStatus2["ErrorNoQuota"] = -10] = "ErrorNoQuota";
17502
+ ResultStatus2[ResultStatus2["ErrorInProgress"] = -11] = "ErrorInProgress";
17503
+ ResultStatus2[ResultStatus2["ErrorNotSupported"] = -12] = "ErrorNotSupported";
17504
+ ResultStatus2[ResultStatus2["ErrorBlocksMainThread"] = -13] = "ErrorBlocksMainThread";
17505
+ })(ResultStatus || (exports.ResultStatus = ResultStatus = {}));
17506
+ }
17507
+ });
17508
+
17445
17509
  // node_modules/@signageos/nacl-decoder/dist/index.js
17446
17510
  var require_dist = __commonJS({
17447
17511
  "node_modules/@signageos/nacl-decoder/dist/index.js"(exports) {
17448
17512
  "use strict";
17449
17513
  Object.defineProperty(exports, "__esModule", { value: true });
17450
- exports.NaClDecoder = void 0;
17514
+ exports.VideoProfile = exports.ResultStatus = exports.HWAcceleration = exports.NaClDecoder = void 0;
17451
17515
  exports.isNaClSupported = isNaClSupported2;
17452
17516
  exports.createNaClDecoder = createNaClDecoder2;
17453
17517
  var messageListeners_1 = require_messageListeners();
@@ -17458,6 +17522,16 @@ var require_dist = __commonJS({
17458
17522
  Object.defineProperty(exports, "NaClDecoder", { enumerable: true, get: function() {
17459
17523
  return naclDecoder_1.NaClDecoder;
17460
17524
  } });
17525
+ var videoDecoder_1 = require_videoDecoder();
17526
+ Object.defineProperty(exports, "HWAcceleration", { enumerable: true, get: function() {
17527
+ return videoDecoder_1.HWAcceleration;
17528
+ } });
17529
+ Object.defineProperty(exports, "ResultStatus", { enumerable: true, get: function() {
17530
+ return videoDecoder_1.ResultStatus;
17531
+ } });
17532
+ Object.defineProperty(exports, "VideoProfile", { enumerable: true, get: function() {
17533
+ return videoDecoder_1.VideoProfile;
17534
+ } });
17461
17535
  function isNaClSupported2() {
17462
17536
  return (
17463
17537
  // Keyed by mime type supported in older versions of Chrome that uses NaCl.
@@ -17966,7 +18040,7 @@ async function initGoEnvironment() {
17966
18040
  }
17967
18041
 
17968
18042
  // daemon/plain.ts
17969
- var DAEMON_JS_URL = "supra-client-daemon.js?v=0.0.0-mznacl.293";
18043
+ var DAEMON_JS_URL = "supra-client-daemon.js?v=0.0.0-mznacl.294";
17970
18044
  async function startPlainDaemon() {
17971
18045
  const fs = await initBrowserFS();
17972
18046
  window.fs = fs;
@@ -17977,7 +18051,7 @@ async function startPlainDaemon() {
17977
18051
  }
17978
18052
 
17979
18053
  // daemon/wasm.ts
17980
- var DAEMON_WASM_URL = "supra-client-daemon.wasm?v=0.0.0-mznacl.293";
18054
+ var DAEMON_WASM_URL = "supra-client-daemon.wasm?v=0.0.0-mznacl.294";
17981
18055
  async function startWasmDaemon() {
17982
18056
  await initGoEnvironment();
17983
18057
  await startGoDaemon();
@@ -18046,7 +18120,7 @@ function getGoArgv2(binFile, options) {
18046
18120
  }
18047
18121
 
18048
18122
  // screen/plain.ts
18049
- var SCREEN_JS_URL = "supra-client-screen.js?v=0.0.0-mznacl.293";
18123
+ var SCREEN_JS_URL = "supra-client-screen.js?v=0.0.0-mznacl.294";
18050
18124
  async function startPlainScreen(options) {
18051
18125
  options = options != null ? options : parseQueryOptions();
18052
18126
  initNaCLDecoder();
@@ -18072,7 +18146,7 @@ async function createH264Decoder() {
18072
18146
  }
18073
18147
 
18074
18148
  // screen/wasm.ts
18075
- var SCREEN_WASM_URL = "supra-client-screen.wasm?v=0.0.0-mznacl.293";
18149
+ var SCREEN_WASM_URL = "supra-client-screen.wasm?v=0.0.0-mznacl.294";
18076
18150
  async function startWasmScreen(options) {
18077
18151
  options = options != null ? options : parseQueryOptions();
18078
18152
  await initH264Decoder();