@supraio/client-daemon-js 1.0.0-mzbrightsigndecoder.477 → 1.0.0-mzbrightsigndecoder.478
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 +7 -2
- package/daemon.js.map +2 -2
- package/package.json +2 -2
- package/screen.html +1 -1
- package/screen.js +64 -11
- package/screen.js.map +3 -3
- package/sdk.js +55 -11
- package/sdk.js.map +3 -3
- package/supra-client-daemon.js +80 -63
- package/supra-client-daemon.js.map +1 -1
- package/supra-client-daemon.wasm +0 -0
- package/supra-client-screen.js +427 -338
- package/supra-client-screen.js.map +1 -1
- package/supra-client-screen.wasm +0 -0
package/sdk.js
CHANGED
|
@@ -24768,6 +24768,7 @@ function isBrightSignRuntimeAvailable() {
|
|
|
24768
24768
|
function initBrightSignTCP() {
|
|
24769
24769
|
registerStreamErrorListener();
|
|
24770
24770
|
if (window.brightSignTCP) {
|
|
24771
|
+
console.log("BrightSign TCP already initialized");
|
|
24771
24772
|
return true;
|
|
24772
24773
|
}
|
|
24773
24774
|
try {
|
|
@@ -24777,6 +24778,7 @@ function initBrightSignTCP() {
|
|
|
24777
24778
|
maxPacketSize: 65535
|
|
24778
24779
|
});
|
|
24779
24780
|
registerTeardown();
|
|
24781
|
+
console.log("BrightSign TCP initialized");
|
|
24780
24782
|
return true;
|
|
24781
24783
|
} catch (error) {
|
|
24782
24784
|
console.log("BrightSign TCP is not available", error);
|
|
@@ -24784,11 +24786,14 @@ function initBrightSignTCP() {
|
|
|
24784
24786
|
}
|
|
24785
24787
|
}
|
|
24786
24788
|
async function initBrightSignDecoder(options) {
|
|
24787
|
-
var _a;
|
|
24789
|
+
var _a, _b, _c;
|
|
24788
24790
|
if (window.brightSignDecoder) {
|
|
24791
|
+
console.log("BrightSign decoder already initialized");
|
|
24789
24792
|
return true;
|
|
24790
24793
|
}
|
|
24791
|
-
|
|
24794
|
+
const runtimeAvailable = (0, import_brightsign_decoder.isBrightSignDecoderSupported)();
|
|
24795
|
+
console.log("BrightSign decoder runtime availability", runtimeAvailable);
|
|
24796
|
+
if (!runtimeAvailable) {
|
|
24792
24797
|
return false;
|
|
24793
24798
|
}
|
|
24794
24799
|
try {
|
|
@@ -24798,6 +24803,11 @@ async function initBrightSignDecoder(options) {
|
|
|
24798
24803
|
width: window.innerWidth,
|
|
24799
24804
|
height: window.innerHeight
|
|
24800
24805
|
};
|
|
24806
|
+
console.log("BrightSign decoder initialization begin", {
|
|
24807
|
+
geometry,
|
|
24808
|
+
streamProtocol: (_b = options.brightSignDecoderStreamProtocol) != null ? _b : "default",
|
|
24809
|
+
streamOptions: (_c = options.brightSignStreamOptions) != null ? _c : null
|
|
24810
|
+
});
|
|
24801
24811
|
const decoder = (0, import_brightsign_decoder.createBrightSignDecoder)({
|
|
24802
24812
|
refRegistry: getReferenceRegistry()
|
|
24803
24813
|
});
|
|
@@ -24808,6 +24818,7 @@ async function initBrightSignDecoder(options) {
|
|
|
24808
24818
|
});
|
|
24809
24819
|
window.brightSignDecoder = decoder;
|
|
24810
24820
|
registerTeardown();
|
|
24821
|
+
console.log("BrightSign decoder initialization complete");
|
|
24811
24822
|
return true;
|
|
24812
24823
|
} catch (error) {
|
|
24813
24824
|
console.error("Failed to initialize BrightSign decoder", error);
|
|
@@ -24834,6 +24845,7 @@ function registerStreamErrorListener() {
|
|
|
24834
24845
|
(event) => console.error("BrightSign native stream error", event)
|
|
24835
24846
|
]);
|
|
24836
24847
|
streamErrorListenerRegistered = true;
|
|
24848
|
+
console.log("BrightSign native stream error listener registered");
|
|
24837
24849
|
}
|
|
24838
24850
|
function getReferenceRegistry() {
|
|
24839
24851
|
if (!referenceRegistry) {
|
|
@@ -24850,12 +24862,14 @@ function registerTeardown() {
|
|
|
24850
24862
|
}
|
|
24851
24863
|
teardownRegistered = true;
|
|
24852
24864
|
window.addEventListener("unload", () => {
|
|
24865
|
+
console.log("BrightSign teardown begin");
|
|
24853
24866
|
const decoder = window.brightSignDecoder;
|
|
24854
24867
|
const tcp = window.brightSignTCP;
|
|
24855
24868
|
window.brightSignDecoder = void 0;
|
|
24856
24869
|
window.brightSignTCP = void 0;
|
|
24857
24870
|
void (decoder == null ? void 0 : decoder.destroy());
|
|
24858
24871
|
void (tcp == null ? void 0 : tcp.destroy());
|
|
24872
|
+
console.log("BrightSign teardown dispatched");
|
|
24859
24873
|
});
|
|
24860
24874
|
}
|
|
24861
24875
|
|
|
@@ -24888,7 +24902,7 @@ async function initSamsungWasmTCP() {
|
|
|
24888
24902
|
}
|
|
24889
24903
|
|
|
24890
24904
|
// daemon/plain.ts
|
|
24891
|
-
var DAEMON_JS_URL = "supra-client-daemon.js?v=1.0.0-mzbrightsigndecoder.
|
|
24905
|
+
var DAEMON_JS_URL = "supra-client-daemon.js?v=1.0.0-mzbrightsigndecoder.478";
|
|
24892
24906
|
async function startPlainDaemon() {
|
|
24893
24907
|
initBrightSignTCP();
|
|
24894
24908
|
await initNaClTCP();
|
|
@@ -24902,7 +24916,7 @@ async function startPlainDaemon() {
|
|
|
24902
24916
|
}
|
|
24903
24917
|
|
|
24904
24918
|
// daemon/wasm.ts
|
|
24905
|
-
var DAEMON_WASM_URL = "supra-client-daemon.wasm?v=1.0.0-mzbrightsigndecoder.
|
|
24919
|
+
var DAEMON_WASM_URL = "supra-client-daemon.wasm?v=1.0.0-mzbrightsigndecoder.478";
|
|
24906
24920
|
async function startWasmDaemon() {
|
|
24907
24921
|
initBrightSignTCP();
|
|
24908
24922
|
await initNaClTCP();
|
|
@@ -25327,15 +25341,41 @@ function getGoArgv2(binFile, options) {
|
|
|
25327
25341
|
}
|
|
25328
25342
|
|
|
25329
25343
|
// screen/plain.ts
|
|
25330
|
-
var SCREEN_JS_URL = "supra-client-screen.js?v=1.0.0-mzbrightsigndecoder.
|
|
25344
|
+
var SCREEN_JS_URL = "supra-client-screen.js?v=1.0.0-mzbrightsigndecoder.478";
|
|
25331
25345
|
async function startPlainScreen(options) {
|
|
25346
|
+
var _a, _b, _c, _d;
|
|
25332
25347
|
console.log("[Supra screen plain] initialization begin");
|
|
25333
25348
|
options = options != null ? options : parseQueryOptions();
|
|
25334
25349
|
options = { ...options, geometry: normalizeGeometry(options.geometry) };
|
|
25350
|
+
console.log("[Supra screen plain] resolved start options", {
|
|
25351
|
+
screenID: options.screenID,
|
|
25352
|
+
screenDriver: options.screenDriver,
|
|
25353
|
+
metadataDriver: options.metadataDriver,
|
|
25354
|
+
secure: options.secure,
|
|
25355
|
+
interactive: options.interactive,
|
|
25356
|
+
netInWorker: options.netInWorker === true,
|
|
25357
|
+
forceScreenSize: (_a = options.forceScreenSize) != null ? _a : null,
|
|
25358
|
+
geometry: (_b = options.geometry) != null ? _b : null,
|
|
25359
|
+
brightSignDecoderStreamProtocol: (_c = options.brightSignDecoderStreamProtocol) != null ? _c : "default",
|
|
25360
|
+
hasBrightSignStreamOptions: options.brightSignStreamOptions !== void 0,
|
|
25361
|
+
encodingPreferences: (_d = options.encodingPreferences) != null ? _d : null
|
|
25362
|
+
});
|
|
25335
25363
|
initNaCLDecoder(options);
|
|
25336
25364
|
initWorkerFrameConnection(options.netInWorker === true);
|
|
25337
|
-
initBrightSignTCP();
|
|
25338
|
-
|
|
25365
|
+
const brightSignTCPReady = initBrightSignTCP();
|
|
25366
|
+
console.log("[Supra screen plain] BrightSign TCP ready", brightSignTCPReady);
|
|
25367
|
+
const brightSignDecoderReady = await initBrightSignDecoder(options);
|
|
25368
|
+
console.log("[Supra screen plain] BrightSign decoder ready", brightSignDecoderReady);
|
|
25369
|
+
if (brightSignDecoderReady) {
|
|
25370
|
+
const sos = Reflect.get(globalThis, "sos");
|
|
25371
|
+
if (typeof sos === "object" && sos !== null) {
|
|
25372
|
+
const config2 = Reflect.get(sos, "config");
|
|
25373
|
+
if (typeof config2 === "object" && config2 !== null) {
|
|
25374
|
+
Reflect.set(config2, "stream", false);
|
|
25375
|
+
console.log("[Supra screen plain] disabled sos.stream fallback for native decoder");
|
|
25376
|
+
}
|
|
25377
|
+
}
|
|
25378
|
+
}
|
|
25339
25379
|
await initNaClTCP(options);
|
|
25340
25380
|
await initSamsungWasmTCP();
|
|
25341
25381
|
await initSamsungWasmDecoder(options);
|
|
@@ -25343,13 +25383,17 @@ async function startPlainScreen(options) {
|
|
|
25343
25383
|
window.fs = fs;
|
|
25344
25384
|
process.argv = ["go", ...getGoArgv2(SCREEN_JS_URL, options)];
|
|
25345
25385
|
Object.assign(process.env, getGoEnv());
|
|
25386
|
+
console.log("[Supra screen plain] Go argv prepared", {
|
|
25387
|
+
argvLength: process.argv.length,
|
|
25388
|
+
screenID: options.screenID
|
|
25389
|
+
});
|
|
25346
25390
|
console.log("[Supra screen plain] script injection begin");
|
|
25347
25391
|
await injectScript(SCREEN_JS_URL);
|
|
25348
25392
|
console.log("[Supra screen plain] script injection complete; waiting for close");
|
|
25349
25393
|
await new Promise((resolve) => {
|
|
25350
25394
|
const interval = setInterval(() => {
|
|
25351
|
-
var
|
|
25352
|
-
if (((
|
|
25395
|
+
var _a2;
|
|
25396
|
+
if (((_a2 = window.__supra) == null ? void 0 : _a2.screenStopCompleted) === true) {
|
|
25353
25397
|
clearInterval(interval);
|
|
25354
25398
|
console.log("[Supra screen plain] lifecycle complete");
|
|
25355
25399
|
resolve();
|
|
@@ -25359,7 +25403,7 @@ async function startPlainScreen(options) {
|
|
|
25359
25403
|
}
|
|
25360
25404
|
|
|
25361
25405
|
// screen/h264decoder.ts
|
|
25362
|
-
var H264_DECODER_URL = "h264decoder.js?v=1.0.0-mzbrightsigndecoder.
|
|
25406
|
+
var H264_DECODER_URL = "h264decoder.js?v=1.0.0-mzbrightsigndecoder.478";
|
|
25363
25407
|
async function initH264Decoder() {
|
|
25364
25408
|
if (window.VideoDecoder !== void 0) {
|
|
25365
25409
|
return void 0;
|
|
@@ -25398,7 +25442,7 @@ function getProperty(value, property) {
|
|
|
25398
25442
|
}
|
|
25399
25443
|
|
|
25400
25444
|
// screen/wasm.ts
|
|
25401
|
-
var SCREEN_WASM_URL = "supra-client-screen.wasm?v=1.0.0-mzbrightsigndecoder.
|
|
25445
|
+
var SCREEN_WASM_URL = "supra-client-screen.wasm?v=1.0.0-mzbrightsigndecoder.478";
|
|
25402
25446
|
async function initializePhase(name, initialize) {
|
|
25403
25447
|
const startedAt = Date.now();
|
|
25404
25448
|
console.log(`[Supra screen WASM] ${name} begin`);
|