@supraio/client-daemon-js 0.0.0-master.231

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.
@@ -0,0 +1 @@
1
+ export declare function injectScript(url: string): Promise<void>;
@@ -0,0 +1 @@
1
+ export declare const FORCE_PLAIN_KEY = "_forcePlain";
@@ -0,0 +1,5 @@
1
+ /// <reference types="node" />
2
+ declare global {
3
+ type NodeBuffer = Buffer;
4
+ }
5
+ export declare function initBrowserFS(): Promise<any>;
package/go/go.d.ts ADDED
@@ -0,0 +1,25 @@
1
+ /// <reference types="node" />
2
+ import nodeFs from 'fs';
3
+ declare global {
4
+ class Go {
5
+ /** Accessed by x264/decode_wasm.go directly to optimize memory usage */
6
+ h264: WebAssembly.Memory;
7
+ env: {
8
+ [name: string]: string;
9
+ };
10
+ importObject: WebAssembly.Imports;
11
+ argv: string[];
12
+ run(instance: WebAssembly.Instance): Promise<void>;
13
+ }
14
+ interface Window {
15
+ /** Make it global accessible for wasm_exec.js */
16
+ fs: typeof nodeFs;
17
+ module: any;
18
+ Go: new () => Go;
19
+ }
20
+ }
21
+ export declare function getGoEnv(): {
22
+ HOME: string;
23
+ USER: string;
24
+ };
25
+ export declare function initGoEnvironment(): Promise<void>;
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@supraio/client-daemon-js",
3
+ "version": "0.0.0-master.231",
4
+ "description": "",
5
+ "main": "sdk.js",
6
+ "scripts": {
7
+ "build-daemon": "esbuild --bundle --sourcemap --define:'process.env.VERSION'=\\\"$VERSION\\\" --target=chrome79,firefox86,edge89 --outfile=dist/daemon.js daemon.ts",
8
+ "build-screen": "esbuild --bundle --sourcemap --define:'process.env.VERSION'=\\\"$VERSION\\\" --target=chrome79,firefox86,edge89 --outfile=dist/screen.js screen.ts",
9
+ "build-sdk": "esbuild --bundle --sourcemap --define:'process.env.VERSION'=\\\"$VERSION\\\" --target=chrome79,firefox86,edge89 --outfile=dist/sdk.js --format=cjs sdk.ts",
10
+ "build-types": "tsc --declaration --emitDeclarationOnly",
11
+ "clean": "rm -rf dist/*",
12
+ "check": "tsc --noEmit",
13
+ "lint": "eslint \"**/*.ts\""
14
+ },
15
+ "devDependencies": {
16
+ "@types/dropboxjs": "0.0.29",
17
+ "@types/filesystem": "0.0.29",
18
+ "@types/node": "14.14.34",
19
+ "@typescript-eslint/eslint-plugin": "^4.17.0",
20
+ "@typescript-eslint/parser": "^4.17.0",
21
+ "browserfs": "1.4.3",
22
+ "esbuild": "0.9.2",
23
+ "eslint": "7.22.0",
24
+ "h264decoder": "git+https://github.com/misak113/h264decoder.git#master",
25
+ "querystring": "0.2.1",
26
+ "typescript": "4.2.3"
27
+ },
28
+ "author": "supra.io",
29
+ "license": "ISC"
30
+ }
@@ -0,0 +1,10 @@
1
+ export interface IScreenOptions {
2
+ screenID: string;
3
+ screenDriver: string;
4
+ screenHost: string;
5
+ metadataDriver: string;
6
+ metadataHost: string;
7
+ clientID: string;
8
+ clientSecret: string;
9
+ secure: boolean;
10
+ }
@@ -0,0 +1 @@
1
+ export declare function startPlainScreen(): Promise<void>;
@@ -0,0 +1,10 @@
1
+ import '../go/go';
2
+ import { H264Decoder } from 'h264decoder';
3
+ import { IScreenOptions } from './options';
4
+ declare global {
5
+ interface Window {
6
+ /** Make it global accessible for x264/decode_wasm.go */
7
+ h264Decoder: H264Decoder;
8
+ }
9
+ }
10
+ export declare function startWasmScreen(options?: IScreenOptions): Promise<void>;
package/screen.css ADDED
@@ -0,0 +1,5 @@
1
+
2
+ body {
3
+ margin: 0;
4
+ overflow: hidden;
5
+ }
package/screen.d.ts ADDED
@@ -0,0 +1 @@
1
+ export {};
package/screen.html ADDED
@@ -0,0 +1,10 @@
1
+ <html>
2
+ <head>
3
+ <meta charset="utf-8"/>
4
+ <title>Supra screen</title>
5
+ <link rel="stylesheet" href="screen.css"></link>
6
+ </head>
7
+ <body>
8
+ <script type="text/javascript" src="screen.js?v=0.0.0-master.231"></script>
9
+ </body>
10
+ </html>