@supraio/client-daemon-js 1.0.0 → 1.1.0-tsfixstreamgeometrypanic.505
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 +1 -1
- package/daemon.js +353 -40
- package/daemon.js.map +4 -4
- package/fs/browserfs.d.ts +1 -0
- package/go/go.d.ts +1 -1
- package/h264decoder.js +139 -0
- package/h264decoder.js.map +7 -0
- package/nacl-decoder_armv7.nexe +0 -0
- package/nacl-decoder_i686.nexe +0 -0
- package/nacl-decoder_x86-64.nexe +0 -0
- package/package.json +5 -5
- package/screen/control.d.ts +23 -3
- package/screen/h264decoder-library.d.ts +1 -0
- package/screen/h264decoder.d.ts +7 -2
- package/screen/nacldecoder.d.ts +2 -1
- package/screen/nacltcp.d.ts +2 -1
- package/screen/options.d.ts +17 -0
- package/screen/samsungwasmdecoder.d.ts +1 -1
- package/screen.html +1 -1
- package/screen.js +602 -313
- package/screen.js.map +4 -4
- package/sdk.js +623 -314
- package/sdk.js.map +4 -4
- package/supra-client-daemon.js +1606 -662
- package/supra-client-daemon.js.map +1 -1
- package/supra-client-daemon.wasm +0 -0
- package/supra-client-screen.js +2640 -1132
- package/supra-client-screen.js.map +1 -1
- package/supra-client-screen.wasm +0 -0
package/daemon.html
CHANGED
package/daemon.js
CHANGED
|
@@ -10290,12 +10290,12 @@
|
|
|
10290
10290
|
if (process2["initializeTTYs"]) {
|
|
10291
10291
|
process2["initializeTTYs"]();
|
|
10292
10292
|
}
|
|
10293
|
-
function
|
|
10293
|
+
function install(obj) {
|
|
10294
10294
|
obj.Buffer = Buffer2;
|
|
10295
10295
|
obj.process = process2;
|
|
10296
10296
|
var oldRequire = obj.require ? obj.require : null;
|
|
10297
10297
|
obj.require = function(arg) {
|
|
10298
|
-
var rv =
|
|
10298
|
+
var rv = BFSRequire2(arg);
|
|
10299
10299
|
if (!rv) {
|
|
10300
10300
|
return oldRequire.apply(null, Array.prototype.slice.call(arguments, 0));
|
|
10301
10301
|
} else {
|
|
@@ -10306,7 +10306,7 @@
|
|
|
10306
10306
|
function registerFileSystem(name, fs2) {
|
|
10307
10307
|
Backends[name] = fs2;
|
|
10308
10308
|
}
|
|
10309
|
-
function
|
|
10309
|
+
function BFSRequire2(module4) {
|
|
10310
10310
|
switch (module4) {
|
|
10311
10311
|
case "fs":
|
|
10312
10312
|
return _fsMock;
|
|
@@ -10421,9 +10421,9 @@
|
|
|
10421
10421
|
};
|
|
10422
10422
|
}
|
|
10423
10423
|
}
|
|
10424
|
-
exports2.install =
|
|
10424
|
+
exports2.install = install;
|
|
10425
10425
|
exports2.registerFileSystem = registerFileSystem;
|
|
10426
|
-
exports2.BFSRequire =
|
|
10426
|
+
exports2.BFSRequire = BFSRequire2;
|
|
10427
10427
|
exports2.initialize = initialize;
|
|
10428
10428
|
exports2.configure = configure2;
|
|
10429
10429
|
exports2.getFileSystem = getFileSystem;
|
|
@@ -17206,6 +17206,37 @@
|
|
|
17206
17206
|
}
|
|
17207
17207
|
});
|
|
17208
17208
|
|
|
17209
|
+
// node_modules/@signageos/nacl-decoder/dist/NaClDecoder/geometry.js
|
|
17210
|
+
var require_geometry = __commonJS({
|
|
17211
|
+
"node_modules/@signageos/nacl-decoder/dist/NaClDecoder/geometry.js"(exports) {
|
|
17212
|
+
"use strict";
|
|
17213
|
+
var __assign = exports && exports.__assign || function() {
|
|
17214
|
+
__assign = Object.assign || function(t) {
|
|
17215
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
17216
|
+
s = arguments[i];
|
|
17217
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
17218
|
+
t[p] = s[p];
|
|
17219
|
+
}
|
|
17220
|
+
return t;
|
|
17221
|
+
};
|
|
17222
|
+
return __assign.apply(this, arguments);
|
|
17223
|
+
};
|
|
17224
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17225
|
+
exports.normalizeGeometry = normalizeGeometry2;
|
|
17226
|
+
function normalizeGeometry2(geometry) {
|
|
17227
|
+
if (!Number.isFinite(geometry.x) || !Number.isFinite(geometry.y) || !Number.isFinite(geometry.width) || !Number.isFinite(geometry.height)) {
|
|
17228
|
+
throw new RangeError("NaCl module geometry values must be finite.");
|
|
17229
|
+
}
|
|
17230
|
+
var width = Math.floor(geometry.width);
|
|
17231
|
+
var height = Math.floor(geometry.height);
|
|
17232
|
+
if (width <= 0 || height <= 0) {
|
|
17233
|
+
throw new RangeError("NaCl module geometry width and height must be positive.");
|
|
17234
|
+
}
|
|
17235
|
+
return __assign(__assign({}, geometry), { width, height });
|
|
17236
|
+
}
|
|
17237
|
+
}
|
|
17238
|
+
});
|
|
17239
|
+
|
|
17209
17240
|
// node_modules/@signageos/nacl-decoder/dist/NaClDecoder/module.js
|
|
17210
17241
|
var require_module = __commonJS({
|
|
17211
17242
|
"node_modules/@signageos/nacl-decoder/dist/NaClDecoder/module.js"(exports) {
|
|
@@ -17213,14 +17244,17 @@
|
|
|
17213
17244
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17214
17245
|
exports.createNaClModule = createNaClModule;
|
|
17215
17246
|
exports.removeNaClModule = removeNaClModule;
|
|
17247
|
+
var geometry_1 = require_geometry();
|
|
17216
17248
|
function handleLoad(event) {
|
|
17217
17249
|
console.log("nacl load", event);
|
|
17218
17250
|
}
|
|
17219
17251
|
function handleCrash(event) {
|
|
17220
17252
|
console.log("nacl crash", event);
|
|
17221
17253
|
}
|
|
17222
|
-
|
|
17223
|
-
|
|
17254
|
+
var messageListeners = /* @__PURE__ */ new WeakMap();
|
|
17255
|
+
function createNaClModule(handleMessage, geometry) {
|
|
17256
|
+
var _a, _b, _c, _d;
|
|
17257
|
+
var normalizedGeometry = geometry ? (0, geometry_1.normalizeGeometry)(geometry) : void 0;
|
|
17224
17258
|
var listenerEl = document.createElement("div");
|
|
17225
17259
|
listenerEl.setAttribute("id", "listener");
|
|
17226
17260
|
listenerEl.addEventListener("message", handleMessage, true);
|
|
@@ -17230,22 +17264,34 @@
|
|
|
17230
17264
|
var baseHref = (_b = (_a = document.getElementsByTagName("base")[0]) === null || _a === void 0 ? void 0 : _a.href) !== null && _b !== void 0 ? _b : location.href;
|
|
17231
17265
|
var nmpPath = new URL("nacl-decoder.nmf", baseHref).href;
|
|
17232
17266
|
var naclModuleEl = document.createElement("embed");
|
|
17233
|
-
|
|
17234
|
-
|
|
17267
|
+
var width = (_c = normalizedGeometry === null || normalizedGeometry === void 0 ? void 0 : normalizedGeometry.width) !== null && _c !== void 0 ? _c : window.screen.width;
|
|
17268
|
+
var height = (_d = normalizedGeometry === null || normalizedGeometry === void 0 ? void 0 : normalizedGeometry.height) !== null && _d !== void 0 ? _d : window.screen.height;
|
|
17269
|
+
naclModuleEl.setAttribute("width", "".concat(width));
|
|
17270
|
+
naclModuleEl.setAttribute("height", "".concat(height));
|
|
17271
|
+
if (normalizedGeometry) {
|
|
17272
|
+
naclModuleEl.style.position = "absolute";
|
|
17273
|
+
naclModuleEl.style.left = "".concat(normalizedGeometry.x, "px");
|
|
17274
|
+
naclModuleEl.style.top = "".concat(normalizedGeometry.y, "px");
|
|
17275
|
+
}
|
|
17235
17276
|
naclModuleEl.setAttribute("src", nmpPath);
|
|
17236
17277
|
naclModuleEl.setAttribute("type", "application/x-nacl");
|
|
17237
17278
|
naclModuleEl.setAttribute("id", "nacl_module");
|
|
17238
17279
|
listenerEl.appendChild(naclModuleEl);
|
|
17280
|
+
messageListeners.set(naclModuleEl, handleMessage);
|
|
17239
17281
|
return naclModuleEl;
|
|
17240
17282
|
}
|
|
17241
17283
|
function removeNaClModule(naclModuleEl) {
|
|
17242
17284
|
var listenerEl = naclModuleEl.parentElement;
|
|
17243
17285
|
if (listenerEl) {
|
|
17244
|
-
|
|
17286
|
+
var handleMessage = messageListeners.get(naclModuleEl);
|
|
17287
|
+
if (handleMessage) {
|
|
17288
|
+
listenerEl.removeEventListener("message", handleMessage, true);
|
|
17289
|
+
}
|
|
17245
17290
|
listenerEl.removeEventListener("load", handleLoad, true);
|
|
17246
17291
|
listenerEl.removeEventListener("crash", handleCrash, true);
|
|
17247
17292
|
listenerEl.remove();
|
|
17248
17293
|
}
|
|
17294
|
+
messageListeners.delete(naclModuleEl);
|
|
17249
17295
|
naclModuleEl.remove();
|
|
17250
17296
|
}
|
|
17251
17297
|
}
|
|
@@ -17969,14 +18015,17 @@
|
|
|
17969
18015
|
var NaClDecoder = (
|
|
17970
18016
|
/** @class */
|
|
17971
18017
|
function() {
|
|
17972
|
-
function NaClDecoder2(messageSender, naclModuleEl) {
|
|
18018
|
+
function NaClDecoder2(messageSender, naclModuleEl, onDestroy) {
|
|
17973
18019
|
this.messageSender = messageSender;
|
|
17974
18020
|
this.naclModuleEl = naclModuleEl;
|
|
18021
|
+
this.onDestroy = onDestroy;
|
|
17975
18022
|
}
|
|
17976
18023
|
NaClDecoder2.prototype.destroy = function() {
|
|
17977
18024
|
return __awaiter(this, void 0, void 0, function() {
|
|
17978
|
-
|
|
18025
|
+
var _a;
|
|
18026
|
+
return __generator(this, function(_b) {
|
|
17979
18027
|
(0, module_1.removeNaClModule)(this.naclModuleEl);
|
|
18028
|
+
(_a = this.onDestroy) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
17980
18029
|
return [
|
|
17981
18030
|
2
|
|
17982
18031
|
/*return*/
|
|
@@ -18265,6 +18314,25 @@
|
|
|
18265
18314
|
var require_dist = __commonJS({
|
|
18266
18315
|
"node_modules/@signageos/nacl-decoder/dist/index.js"(exports) {
|
|
18267
18316
|
"use strict";
|
|
18317
|
+
var __extends = exports && exports.__extends || /* @__PURE__ */ function() {
|
|
18318
|
+
var extendStatics = function(d, b) {
|
|
18319
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
18320
|
+
d2.__proto__ = b2;
|
|
18321
|
+
} || function(d2, b2) {
|
|
18322
|
+
for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
|
|
18323
|
+
};
|
|
18324
|
+
return extendStatics(d, b);
|
|
18325
|
+
};
|
|
18326
|
+
return function(d, b) {
|
|
18327
|
+
if (typeof b !== "function" && b !== null)
|
|
18328
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
18329
|
+
extendStatics(d, b);
|
|
18330
|
+
function __() {
|
|
18331
|
+
this.constructor = d;
|
|
18332
|
+
}
|
|
18333
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
18334
|
+
};
|
|
18335
|
+
}();
|
|
18268
18336
|
var __assign = exports && exports.__assign || function() {
|
|
18269
18337
|
__assign = Object.assign || function(t) {
|
|
18270
18338
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -18276,6 +18344,102 @@
|
|
|
18276
18344
|
};
|
|
18277
18345
|
return __assign.apply(this, arguments);
|
|
18278
18346
|
};
|
|
18347
|
+
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
18348
|
+
function adopt(value) {
|
|
18349
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
18350
|
+
resolve(value);
|
|
18351
|
+
});
|
|
18352
|
+
}
|
|
18353
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
18354
|
+
function fulfilled(value) {
|
|
18355
|
+
try {
|
|
18356
|
+
step(generator.next(value));
|
|
18357
|
+
} catch (e) {
|
|
18358
|
+
reject(e);
|
|
18359
|
+
}
|
|
18360
|
+
}
|
|
18361
|
+
function rejected(value) {
|
|
18362
|
+
try {
|
|
18363
|
+
step(generator["throw"](value));
|
|
18364
|
+
} catch (e) {
|
|
18365
|
+
reject(e);
|
|
18366
|
+
}
|
|
18367
|
+
}
|
|
18368
|
+
function step(result) {
|
|
18369
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
18370
|
+
}
|
|
18371
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18372
|
+
});
|
|
18373
|
+
};
|
|
18374
|
+
var __generator = exports && exports.__generator || function(thisArg, body) {
|
|
18375
|
+
var _ = { label: 0, sent: function() {
|
|
18376
|
+
if (t[0] & 1) throw t[1];
|
|
18377
|
+
return t[1];
|
|
18378
|
+
}, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
18379
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
18380
|
+
return this;
|
|
18381
|
+
}), g;
|
|
18382
|
+
function verb(n) {
|
|
18383
|
+
return function(v) {
|
|
18384
|
+
return step([n, v]);
|
|
18385
|
+
};
|
|
18386
|
+
}
|
|
18387
|
+
function step(op) {
|
|
18388
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
18389
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18390
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18391
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
18392
|
+
switch (op[0]) {
|
|
18393
|
+
case 0:
|
|
18394
|
+
case 1:
|
|
18395
|
+
t = op;
|
|
18396
|
+
break;
|
|
18397
|
+
case 4:
|
|
18398
|
+
_.label++;
|
|
18399
|
+
return { value: op[1], done: false };
|
|
18400
|
+
case 5:
|
|
18401
|
+
_.label++;
|
|
18402
|
+
y = op[1];
|
|
18403
|
+
op = [0];
|
|
18404
|
+
continue;
|
|
18405
|
+
case 7:
|
|
18406
|
+
op = _.ops.pop();
|
|
18407
|
+
_.trys.pop();
|
|
18408
|
+
continue;
|
|
18409
|
+
default:
|
|
18410
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
18411
|
+
_ = 0;
|
|
18412
|
+
continue;
|
|
18413
|
+
}
|
|
18414
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
18415
|
+
_.label = op[1];
|
|
18416
|
+
break;
|
|
18417
|
+
}
|
|
18418
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
18419
|
+
_.label = t[1];
|
|
18420
|
+
t = op;
|
|
18421
|
+
break;
|
|
18422
|
+
}
|
|
18423
|
+
if (t && _.label < t[2]) {
|
|
18424
|
+
_.label = t[2];
|
|
18425
|
+
_.ops.push(op);
|
|
18426
|
+
break;
|
|
18427
|
+
}
|
|
18428
|
+
if (t[2]) _.ops.pop();
|
|
18429
|
+
_.trys.pop();
|
|
18430
|
+
continue;
|
|
18431
|
+
}
|
|
18432
|
+
op = body.call(thisArg, _);
|
|
18433
|
+
} catch (e) {
|
|
18434
|
+
op = [6, e];
|
|
18435
|
+
y = 0;
|
|
18436
|
+
} finally {
|
|
18437
|
+
f = t = 0;
|
|
18438
|
+
}
|
|
18439
|
+
if (op[0] & 5) throw op[1];
|
|
18440
|
+
return { value: op[0] ? op[1] : void 0, done: true };
|
|
18441
|
+
}
|
|
18442
|
+
};
|
|
18279
18443
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18280
18444
|
exports.NaClTCPStreamConnection = exports.NaClTCPStream = exports.NaClTCPPacketConnection = exports.NaClTCPPacket = exports.NaClFrameCollector = exports.VideoProfile = exports.ResultStatus = exports.HWAcceleration = exports.NaClDecoder = void 0;
|
|
18281
18445
|
exports.isNaClSupported = isNaClSupported3;
|
|
@@ -18318,6 +18482,29 @@
|
|
|
18318
18482
|
var DEFAULT_OPTIONS = {
|
|
18319
18483
|
timeoutMs: 1e3
|
|
18320
18484
|
};
|
|
18485
|
+
var RuntimeOwnedNaClDecoder = (
|
|
18486
|
+
/** @class */
|
|
18487
|
+
function(_super) {
|
|
18488
|
+
__extends(RuntimeOwnedNaClDecoder2, _super);
|
|
18489
|
+
function RuntimeOwnedNaClDecoder2(messageSender, naclModuleEl, releaseRuntime) {
|
|
18490
|
+
var _this = _super.call(this, messageSender, naclModuleEl) || this;
|
|
18491
|
+
_this.releaseRuntime = releaseRuntime;
|
|
18492
|
+
return _this;
|
|
18493
|
+
}
|
|
18494
|
+
RuntimeOwnedNaClDecoder2.prototype.destroy = function() {
|
|
18495
|
+
return __awaiter(this, void 0, void 0, function() {
|
|
18496
|
+
return __generator(this, function(_a) {
|
|
18497
|
+
this.releaseRuntime();
|
|
18498
|
+
return [
|
|
18499
|
+
2
|
|
18500
|
+
/*return*/
|
|
18501
|
+
];
|
|
18502
|
+
});
|
|
18503
|
+
});
|
|
18504
|
+
};
|
|
18505
|
+
return RuntimeOwnedNaClDecoder2;
|
|
18506
|
+
}(naclDecoder_1.NaClDecoder)
|
|
18507
|
+
);
|
|
18321
18508
|
var naclRuntime = null;
|
|
18322
18509
|
function isNaClSupported3() {
|
|
18323
18510
|
return (
|
|
@@ -18330,26 +18517,48 @@
|
|
|
18330
18517
|
if (!isNaClSupported3()) {
|
|
18331
18518
|
throw new Error("NaCl is not supported in this browser.");
|
|
18332
18519
|
}
|
|
18333
|
-
var
|
|
18334
|
-
return new
|
|
18520
|
+
var _a = acquireNaClRuntime(requiredOptions.timeoutMs, options === null || options === void 0 ? void 0 : options.geometry), runtime = _a.runtime, release = _a.release;
|
|
18521
|
+
return new RuntimeOwnedNaClDecoder(runtime.messageSender, runtime.naclModuleEl, release);
|
|
18335
18522
|
}
|
|
18336
18523
|
function createNaClTCP2(options) {
|
|
18337
18524
|
var decoder = createNaClDecoder2(options);
|
|
18338
|
-
return decoder.createTCP()
|
|
18525
|
+
return __assign(__assign({}, decoder.createTCP()), { destroy: function() {
|
|
18526
|
+
return decoder.destroy();
|
|
18527
|
+
} });
|
|
18339
18528
|
}
|
|
18340
|
-
function
|
|
18341
|
-
|
|
18342
|
-
|
|
18529
|
+
function acquireNaClRuntime(timeoutMs, geometry) {
|
|
18530
|
+
var runtime = naclRuntime;
|
|
18531
|
+
if (!runtime) {
|
|
18532
|
+
var messageListeners = (0, messageListeners_1.createMessageListeners)();
|
|
18533
|
+
var messageReceiver = new messageReceiver_1.MessageReceiver(messageListeners);
|
|
18534
|
+
var naclModuleEl = (0, module_1.createNaClModule)(messageReceiver.handleMessage.bind(messageReceiver), geometry);
|
|
18535
|
+
var messageSender = new messageSender_1.MessageSender(naclModuleEl, messageListeners, timeoutMs);
|
|
18536
|
+
runtime = {
|
|
18537
|
+
messageSender,
|
|
18538
|
+
naclModuleEl,
|
|
18539
|
+
ownerCount: 0
|
|
18540
|
+
};
|
|
18541
|
+
naclRuntime = runtime;
|
|
18343
18542
|
}
|
|
18344
|
-
|
|
18345
|
-
var
|
|
18346
|
-
|
|
18347
|
-
|
|
18348
|
-
|
|
18349
|
-
|
|
18350
|
-
|
|
18543
|
+
runtime.ownerCount += 1;
|
|
18544
|
+
var released = false;
|
|
18545
|
+
return {
|
|
18546
|
+
runtime,
|
|
18547
|
+
release: function() {
|
|
18548
|
+
if (released) {
|
|
18549
|
+
return;
|
|
18550
|
+
}
|
|
18551
|
+
released = true;
|
|
18552
|
+
runtime.ownerCount -= 1;
|
|
18553
|
+
if (runtime.ownerCount > 0) {
|
|
18554
|
+
return;
|
|
18555
|
+
}
|
|
18556
|
+
(0, module_1.removeNaClModule)(runtime.naclModuleEl);
|
|
18557
|
+
if (naclRuntime === runtime) {
|
|
18558
|
+
naclRuntime = null;
|
|
18559
|
+
}
|
|
18560
|
+
}
|
|
18351
18561
|
};
|
|
18352
|
-
return naclRuntime;
|
|
18353
18562
|
}
|
|
18354
18563
|
}
|
|
18355
18564
|
});
|
|
@@ -18376,6 +18585,36 @@
|
|
|
18376
18585
|
}
|
|
18377
18586
|
});
|
|
18378
18587
|
|
|
18588
|
+
// node_modules/@signageos/samsung-wasm-decoder/dist/WasmDecoder/videoElementGeometry.js
|
|
18589
|
+
var require_videoElementGeometry = __commonJS({
|
|
18590
|
+
"node_modules/@signageos/samsung-wasm-decoder/dist/WasmDecoder/videoElementGeometry.js"(exports) {
|
|
18591
|
+
"use strict";
|
|
18592
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18593
|
+
exports.normalizeVideoElementGeometry = normalizeVideoElementGeometry;
|
|
18594
|
+
function normalizeDimension(name, value) {
|
|
18595
|
+
var normalizedValue = Math.floor(value);
|
|
18596
|
+
if (!Number.isFinite(value) || normalizedValue <= 0) {
|
|
18597
|
+
throw new RangeError("".concat(name, " must be a finite positive number."));
|
|
18598
|
+
}
|
|
18599
|
+
return normalizedValue;
|
|
18600
|
+
}
|
|
18601
|
+
function normalizeCoordinate(name, value) {
|
|
18602
|
+
if (!Number.isFinite(value)) {
|
|
18603
|
+
throw new RangeError("".concat(name, " must be a finite number."));
|
|
18604
|
+
}
|
|
18605
|
+
return value;
|
|
18606
|
+
}
|
|
18607
|
+
function normalizeVideoElementGeometry(geometry) {
|
|
18608
|
+
return {
|
|
18609
|
+
x: normalizeCoordinate("x", geometry.x),
|
|
18610
|
+
y: normalizeCoordinate("y", geometry.y),
|
|
18611
|
+
width: normalizeDimension("width", geometry.width),
|
|
18612
|
+
height: normalizeDimension("height", geometry.height)
|
|
18613
|
+
};
|
|
18614
|
+
}
|
|
18615
|
+
}
|
|
18616
|
+
});
|
|
18617
|
+
|
|
18379
18618
|
// node_modules/@signageos/samsung-wasm-decoder/dist/dom/script.js
|
|
18380
18619
|
var require_script = __commonJS({
|
|
18381
18620
|
"node_modules/@signageos/samsung-wasm-decoder/dist/dom/script.js"(exports) {
|
|
@@ -19660,6 +19899,7 @@
|
|
|
19660
19899
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19661
19900
|
exports.SamsungWasmDecoder = void 0;
|
|
19662
19901
|
var videoDecoder_1 = require_videoDecoder2();
|
|
19902
|
+
var videoElementGeometry_1 = require_videoElementGeometry();
|
|
19663
19903
|
var wasmLoader_1 = require_wasmLoader();
|
|
19664
19904
|
var wasmTCP_1 = require_wasmTCP();
|
|
19665
19905
|
function detectKeyFrameAnnexB(bytes) {
|
|
@@ -19690,19 +19930,25 @@
|
|
|
19690
19930
|
}
|
|
19691
19931
|
return false;
|
|
19692
19932
|
}
|
|
19693
|
-
function ensureVideoElement(videoElementId) {
|
|
19933
|
+
function ensureVideoElement(videoElementId, geometry) {
|
|
19934
|
+
var normalizedGeometry = (0, videoElementGeometry_1.normalizeVideoElementGeometry)(geometry !== null && geometry !== void 0 ? geometry : {
|
|
19935
|
+
x: 0,
|
|
19936
|
+
y: 0,
|
|
19937
|
+
width: screen.width,
|
|
19938
|
+
height: screen.height
|
|
19939
|
+
});
|
|
19694
19940
|
var el = document.getElementById(videoElementId);
|
|
19695
19941
|
if (!el) {
|
|
19696
19942
|
el = document.createElement("video");
|
|
19697
19943
|
el.id = videoElementId;
|
|
19698
|
-
el.style.position = "absolute";
|
|
19699
|
-
el.style.top = "0";
|
|
19700
|
-
el.style.left = "0";
|
|
19701
|
-
el.style.width = "1920px";
|
|
19702
|
-
el.style.height = "1080px";
|
|
19703
19944
|
el.style.backgroundColor = "#000";
|
|
19704
19945
|
document.body.appendChild(el);
|
|
19705
19946
|
}
|
|
19947
|
+
el.style.position = "absolute";
|
|
19948
|
+
el.style.top = "".concat(normalizedGeometry.y, "px");
|
|
19949
|
+
el.style.left = "".concat(normalizedGeometry.x, "px");
|
|
19950
|
+
el.style.width = "".concat(normalizedGeometry.width, "px");
|
|
19951
|
+
el.style.height = "".concat(normalizedGeometry.height, "px");
|
|
19706
19952
|
el.autoplay = true;
|
|
19707
19953
|
el.muted = true;
|
|
19708
19954
|
el.playsInline = true;
|
|
@@ -19711,14 +19957,14 @@
|
|
|
19711
19957
|
var SamsungWasmDecoder2 = (
|
|
19712
19958
|
/** @class */
|
|
19713
19959
|
function() {
|
|
19714
|
-
function SamsungWasmDecoder3(videoElementId) {
|
|
19960
|
+
function SamsungWasmDecoder3(videoElementId, geometry) {
|
|
19715
19961
|
this.videoElementId = videoElementId;
|
|
19716
19962
|
this.initialized = false;
|
|
19717
19963
|
this.destroyed = false;
|
|
19718
19964
|
this.decoderHandle = 0;
|
|
19719
19965
|
this.ptsSeconds = 0;
|
|
19720
19966
|
this.frameDurationSeconds = 0;
|
|
19721
|
-
this.videoElement = ensureVideoElement(videoElementId);
|
|
19967
|
+
this.videoElement = ensureVideoElement(videoElementId, geometry);
|
|
19722
19968
|
}
|
|
19723
19969
|
SamsungWasmDecoder3.prototype.destroy = function() {
|
|
19724
19970
|
return __awaiter(this, void 0, void 0, function() {
|
|
@@ -20091,7 +20337,7 @@
|
|
|
20091
20337
|
return [4, (0, wasmLoader_1.loadWasmModule)()];
|
|
20092
20338
|
case 1:
|
|
20093
20339
|
_a.sent();
|
|
20094
|
-
return [2, new wasmDecoder_1.SamsungWasmDecoder(options.videoElementId)];
|
|
20340
|
+
return [2, new wasmDecoder_1.SamsungWasmDecoder(options.videoElementId, options.geometry)];
|
|
20095
20341
|
}
|
|
20096
20342
|
});
|
|
20097
20343
|
});
|
|
@@ -20240,7 +20486,7 @@
|
|
|
20240
20486
|
options: {}
|
|
20241
20487
|
};
|
|
20242
20488
|
async function initBrowserFS() {
|
|
20243
|
-
|
|
20489
|
+
installBrowserFSGlobals();
|
|
20244
20490
|
await new Promise((resolve, reject) => {
|
|
20245
20491
|
BrowserFS.configure(config, (error) => {
|
|
20246
20492
|
if (error) {
|
|
@@ -20254,6 +20500,73 @@
|
|
|
20254
20500
|
shim(fs);
|
|
20255
20501
|
return fs;
|
|
20256
20502
|
}
|
|
20503
|
+
var installedBrowserFSRequire;
|
|
20504
|
+
function installBrowserFSGlobals() {
|
|
20505
|
+
const browserFSProcess = BrowserFS.BFSRequire("process");
|
|
20506
|
+
if (!window.process) {
|
|
20507
|
+
Object.defineProperty(window, "process", {
|
|
20508
|
+
configurable: true,
|
|
20509
|
+
enumerable: true,
|
|
20510
|
+
value: {},
|
|
20511
|
+
writable: true
|
|
20512
|
+
});
|
|
20513
|
+
}
|
|
20514
|
+
const processPolyfills = /* @__PURE__ */ new Map([
|
|
20515
|
+
["browser", true],
|
|
20516
|
+
["env", {}],
|
|
20517
|
+
["getuid", browserFSProcess.getuid.bind(browserFSProcess)],
|
|
20518
|
+
["getgid", browserFSProcess.getgid.bind(browserFSProcess)],
|
|
20519
|
+
["geteuid", browserFSProcess.getuid.bind(browserFSProcess)],
|
|
20520
|
+
["getegid", browserFSProcess.getgid.bind(browserFSProcess)],
|
|
20521
|
+
["getgroups", () => {
|
|
20522
|
+
throw createNotImplementedError();
|
|
20523
|
+
}],
|
|
20524
|
+
["pid", browserFSProcess.pid],
|
|
20525
|
+
["ppid", -1],
|
|
20526
|
+
["umask", browserFSProcess.umask.bind(browserFSProcess)],
|
|
20527
|
+
["cwd", browserFSProcess.cwd.bind(browserFSProcess)],
|
|
20528
|
+
["chdir", browserFSProcess.chdir.bind(browserFSProcess)]
|
|
20529
|
+
]);
|
|
20530
|
+
for (const [property, value] of processPolyfills) {
|
|
20531
|
+
if (Reflect.get(window.process, property) === void 0) {
|
|
20532
|
+
Object.defineProperty(window.process, property, {
|
|
20533
|
+
configurable: true,
|
|
20534
|
+
value,
|
|
20535
|
+
writable: true
|
|
20536
|
+
});
|
|
20537
|
+
}
|
|
20538
|
+
}
|
|
20539
|
+
if (!installedBrowserFSRequire) {
|
|
20540
|
+
const previousRequire = window.require;
|
|
20541
|
+
installedBrowserFSRequire = (moduleName) => {
|
|
20542
|
+
const browserFSModule = BrowserFS.BFSRequire(moduleName);
|
|
20543
|
+
if (browserFSModule) {
|
|
20544
|
+
return browserFSModule;
|
|
20545
|
+
}
|
|
20546
|
+
if (previousRequire) {
|
|
20547
|
+
return previousRequire(moduleName);
|
|
20548
|
+
}
|
|
20549
|
+
throw new Error(`Cannot find module '${moduleName}'`);
|
|
20550
|
+
};
|
|
20551
|
+
}
|
|
20552
|
+
Object.defineProperty(window, "Buffer", {
|
|
20553
|
+
configurable: true,
|
|
20554
|
+
enumerable: true,
|
|
20555
|
+
value: BrowserFS.BFSRequire("buffer").Buffer,
|
|
20556
|
+
writable: true
|
|
20557
|
+
});
|
|
20558
|
+
Object.defineProperty(window, "require", {
|
|
20559
|
+
configurable: true,
|
|
20560
|
+
enumerable: true,
|
|
20561
|
+
value: installedBrowserFSRequire,
|
|
20562
|
+
writable: true
|
|
20563
|
+
});
|
|
20564
|
+
}
|
|
20565
|
+
function createNotImplementedError() {
|
|
20566
|
+
const error = new Error("not implemented");
|
|
20567
|
+
Object.defineProperty(error, "code", { value: "ENOSYS" });
|
|
20568
|
+
return error;
|
|
20569
|
+
}
|
|
20257
20570
|
function getStringFlagsByNumber(fs, origFlags) {
|
|
20258
20571
|
if ((origFlags & (fs.constants.O_APPEND | fs.constants.O_CREAT)) !== 0) {
|
|
20259
20572
|
return "a";
|
|
@@ -20447,9 +20760,9 @@
|
|
|
20447
20760
|
|
|
20448
20761
|
// screen/nacltcp.ts
|
|
20449
20762
|
var import_nacl_decoder = __toESM(require_dist());
|
|
20450
|
-
async function initNaClTCP() {
|
|
20763
|
+
async function initNaClTCP(options) {
|
|
20451
20764
|
if ((0, import_nacl_decoder.isNaClSupported)()) {
|
|
20452
|
-
const { tcpPacket, tcpStream } = (0, import_nacl_decoder.createNaClTCP)();
|
|
20765
|
+
const { tcpPacket, tcpStream } = (0, import_nacl_decoder.createNaClTCP)({ geometry: options == null ? void 0 : options.geometry });
|
|
20453
20766
|
if (!window.naclTCPPacket) {
|
|
20454
20767
|
window.naclTCPPacket = tcpPacket;
|
|
20455
20768
|
}
|
|
@@ -20474,7 +20787,7 @@
|
|
|
20474
20787
|
}
|
|
20475
20788
|
|
|
20476
20789
|
// daemon/plain.ts
|
|
20477
|
-
var DAEMON_JS_URL = "supra-client-daemon.js?v=1.0.
|
|
20790
|
+
var DAEMON_JS_URL = "supra-client-daemon.js?v=1.1.0-tsfixstreamgeometrypanic.505";
|
|
20478
20791
|
async function startPlainDaemon() {
|
|
20479
20792
|
await initNaClTCP();
|
|
20480
20793
|
await initSamsungWasmTCP();
|
|
@@ -20487,7 +20800,7 @@
|
|
|
20487
20800
|
}
|
|
20488
20801
|
|
|
20489
20802
|
// daemon/wasm.ts
|
|
20490
|
-
var DAEMON_WASM_URL = "supra-client-daemon.wasm?v=1.0.
|
|
20803
|
+
var DAEMON_WASM_URL = "supra-client-daemon.wasm?v=1.1.0-tsfixstreamgeometrypanic.505";
|
|
20491
20804
|
async function startWasmDaemon() {
|
|
20492
20805
|
await initNaClTCP();
|
|
20493
20806
|
await initSamsungWasmTCP();
|