@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supraio/client-daemon-js",
3
- "version": "0.0.0-mznacl.292",
3
+ "version": "0.0.0-mznacl.294",
4
4
  "description": "",
5
5
  "main": "sdk.js",
6
6
  "types": "sdk.d.ts",
@@ -14,7 +14,7 @@
14
14
  "lint": "eslint \"**/*.ts\""
15
15
  },
16
16
  "devDependencies": {
17
- "@signageos/nacl-decoder": "^0.0.1",
17
+ "@signageos/nacl-decoder": "^0.0.3",
18
18
  "@types/dropboxjs": "0.0.29",
19
19
  "@types/filesystem": "0.0.29",
20
20
  "@types/node": "14.14.34",
package/screen.html CHANGED
@@ -5,6 +5,6 @@
5
5
  <link rel="stylesheet" href="screen.css"></link>
6
6
  </head>
7
7
  <body>
8
- <script type="text/javascript" src="screen.js?v=0.0.0-mznacl.292"></script>
8
+ <script type="text/javascript" src="screen.js?v=0.0.0-mznacl.294"></script>
9
9
  </body>
10
10
  </html>
package/screen.js CHANGED
@@ -17019,17 +17019,25 @@
17019
17019
  MessageSender2.prototype.sendWithoutResult = function(message) {
17020
17020
  this.naclModuleEl.postMessage((0, messageConvertor_1.convertMessageToArrayBuffer)(message));
17021
17021
  };
17022
- MessageSender2.prototype.sendWithResult = function(message, resultMessageType) {
17023
- return __awaiter(this, void 0, void 0, function() {
17022
+ MessageSender2.prototype.sendWithResult = function(message_1, resultMessageType_1) {
17023
+ return __awaiter(this, arguments, void 0, function(message, resultMessageType, timeoutMs) {
17024
17024
  var arrayBuffer;
17025
17025
  var _this = this;
17026
+ if (timeoutMs === void 0) {
17027
+ timeoutMs = 1e3;
17028
+ }
17026
17029
  return __generator(this, function(_a) {
17027
17030
  arrayBuffer = (0, messageConvertor_1.convertMessageToArrayBuffer)(message);
17028
- return [2, new Promise(function(resolve) {
17031
+ return [2, new Promise(function(resolve, reject) {
17032
+ var timeoutHandler = setTimeout(function() {
17033
+ _this.messageListeners.delete(listener);
17034
+ reject(new Error("Timeout"));
17035
+ }, timeoutMs);
17029
17036
  var listener = function(message2) {
17030
17037
  if (message2.type !== resultMessageType) {
17031
17038
  return;
17032
17039
  }
17040
+ clearTimeout(timeoutHandler);
17033
17041
  _this.messageListeners.delete(listener);
17034
17042
  resolve(message2);
17035
17043
  };
@@ -17443,12 +17451,68 @@
17443
17451
  }
17444
17452
  });
17445
17453
 
17454
+ // node_modules/@signageos/nacl-decoder/dist/NaClDecoder/videoDecoder.js
17455
+ var require_videoDecoder = __commonJS({
17456
+ "node_modules/@signageos/nacl-decoder/dist/NaClDecoder/videoDecoder.js"(exports) {
17457
+ "use strict";
17458
+ Object.defineProperty(exports, "__esModule", { value: true });
17459
+ exports.ResultStatus = exports.GLTexture = exports.HWAcceleration = exports.VideoProfile = void 0;
17460
+ var VideoProfile;
17461
+ (function(VideoProfile2) {
17462
+ VideoProfile2[VideoProfile2["H264Baseline"] = 0] = "H264Baseline";
17463
+ VideoProfile2[VideoProfile2["H264Main"] = 1] = "H264Main";
17464
+ VideoProfile2[VideoProfile2["H264Extended"] = 2] = "H264Extended";
17465
+ VideoProfile2[VideoProfile2["H264High"] = 3] = "H264High";
17466
+ VideoProfile2[VideoProfile2["H264High10Profile"] = 4] = "H264High10Profile";
17467
+ VideoProfile2[VideoProfile2["H264High422Profile"] = 5] = "H264High422Profile";
17468
+ VideoProfile2[VideoProfile2["H264High444PredictiveProfile"] = 6] = "H264High444PredictiveProfile";
17469
+ VideoProfile2[VideoProfile2["H264ScalableBaseline"] = 7] = "H264ScalableBaseline";
17470
+ VideoProfile2[VideoProfile2["H264ScalableHigh"] = 8] = "H264ScalableHigh";
17471
+ VideoProfile2[VideoProfile2["H264StereoHigh"] = 9] = "H264StereoHigh";
17472
+ VideoProfile2[VideoProfile2["H264MultiviewHigh"] = 10] = "H264MultiviewHigh";
17473
+ VideoProfile2[VideoProfile2["VP8Any"] = 11] = "VP8Any";
17474
+ VideoProfile2[VideoProfile2["VP9Any"] = 12] = "VP9Any";
17475
+ VideoProfile2[VideoProfile2["Max"] = 12] = "Max";
17476
+ })(VideoProfile || (exports.VideoProfile = VideoProfile = {}));
17477
+ var HWAcceleration;
17478
+ (function(HWAcceleration2) {
17479
+ HWAcceleration2[HWAcceleration2["Only"] = 0] = "Only";
17480
+ HWAcceleration2[HWAcceleration2["WithFallback"] = 1] = "WithFallback";
17481
+ HWAcceleration2[HWAcceleration2["None"] = 2] = "None";
17482
+ HWAcceleration2[HWAcceleration2["Last"] = 2] = "Last";
17483
+ })(HWAcceleration || (exports.HWAcceleration = HWAcceleration = {}));
17484
+ var GLTexture;
17485
+ (function(GLTexture2) {
17486
+ GLTexture2[GLTexture2["Texture2D"] = 3553] = "Texture2D";
17487
+ GLTexture2[GLTexture2["TextureRectangleARB"] = 34037] = "TextureRectangleARB";
17488
+ GLTexture2[GLTexture2["TextureExternal"] = 36197] = "TextureExternal";
17489
+ })(GLTexture || (exports.GLTexture = GLTexture = {}));
17490
+ var ResultStatus;
17491
+ (function(ResultStatus2) {
17492
+ ResultStatus2[ResultStatus2["Ok"] = 0] = "Ok";
17493
+ ResultStatus2[ResultStatus2["OkCompletionPending"] = -1] = "OkCompletionPending";
17494
+ ResultStatus2[ResultStatus2["ErrorFailed"] = -2] = "ErrorFailed";
17495
+ ResultStatus2[ResultStatus2["ErrorAborted"] = -3] = "ErrorAborted";
17496
+ ResultStatus2[ResultStatus2["ErrorBadArgument"] = -4] = "ErrorBadArgument";
17497
+ ResultStatus2[ResultStatus2["ErrorBadResource"] = -5] = "ErrorBadResource";
17498
+ ResultStatus2[ResultStatus2["ErrorNoInit"] = -6] = "ErrorNoInit";
17499
+ ResultStatus2[ResultStatus2["ErrorNoAccess"] = -7] = "ErrorNoAccess";
17500
+ ResultStatus2[ResultStatus2["ErrorNoMemory"] = -8] = "ErrorNoMemory";
17501
+ ResultStatus2[ResultStatus2["ErrorNoSpace"] = -9] = "ErrorNoSpace";
17502
+ ResultStatus2[ResultStatus2["ErrorNoQuota"] = -10] = "ErrorNoQuota";
17503
+ ResultStatus2[ResultStatus2["ErrorInProgress"] = -11] = "ErrorInProgress";
17504
+ ResultStatus2[ResultStatus2["ErrorNotSupported"] = -12] = "ErrorNotSupported";
17505
+ ResultStatus2[ResultStatus2["ErrorBlocksMainThread"] = -13] = "ErrorBlocksMainThread";
17506
+ })(ResultStatus || (exports.ResultStatus = ResultStatus = {}));
17507
+ }
17508
+ });
17509
+
17446
17510
  // node_modules/@signageos/nacl-decoder/dist/index.js
17447
17511
  var require_dist = __commonJS({
17448
17512
  "node_modules/@signageos/nacl-decoder/dist/index.js"(exports) {
17449
17513
  "use strict";
17450
17514
  Object.defineProperty(exports, "__esModule", { value: true });
17451
- exports.NaClDecoder = void 0;
17515
+ exports.VideoProfile = exports.ResultStatus = exports.HWAcceleration = exports.NaClDecoder = void 0;
17452
17516
  exports.isNaClSupported = isNaClSupported2;
17453
17517
  exports.createNaClDecoder = createNaClDecoder2;
17454
17518
  var messageListeners_1 = require_messageListeners();
@@ -17459,6 +17523,16 @@
17459
17523
  Object.defineProperty(exports, "NaClDecoder", { enumerable: true, get: function() {
17460
17524
  return naclDecoder_1.NaClDecoder;
17461
17525
  } });
17526
+ var videoDecoder_1 = require_videoDecoder();
17527
+ Object.defineProperty(exports, "HWAcceleration", { enumerable: true, get: function() {
17528
+ return videoDecoder_1.HWAcceleration;
17529
+ } });
17530
+ Object.defineProperty(exports, "ResultStatus", { enumerable: true, get: function() {
17531
+ return videoDecoder_1.ResultStatus;
17532
+ } });
17533
+ Object.defineProperty(exports, "VideoProfile", { enumerable: true, get: function() {
17534
+ return videoDecoder_1.VideoProfile;
17535
+ } });
17462
17536
  function isNaClSupported2() {
17463
17537
  return (
17464
17538
  // Keyed by mime type supported in older versions of Chrome that uses NaCl.
@@ -18009,7 +18083,7 @@
18009
18083
  }
18010
18084
 
18011
18085
  // screen/plain.ts
18012
- var SCREEN_JS_URL = "supra-client-screen.js?v=0.0.0-mznacl.292";
18086
+ var SCREEN_JS_URL = "supra-client-screen.js?v=0.0.0-mznacl.294";
18013
18087
  async function startPlainScreen(options) {
18014
18088
  options = options != null ? options : parseQueryOptions();
18015
18089
  initNaCLDecoder();
@@ -18035,7 +18109,7 @@
18035
18109
  }
18036
18110
 
18037
18111
  // screen/wasm.ts
18038
- var SCREEN_WASM_URL = "supra-client-screen.wasm?v=0.0.0-mznacl.292";
18112
+ var SCREEN_WASM_URL = "supra-client-screen.wasm?v=0.0.0-mznacl.294";
18039
18113
  async function startWasmScreen(options) {
18040
18114
  options = options != null ? options : parseQueryOptions();
18041
18115
  await initH264Decoder();