mirror of
https://github.com/koush/scrypted.git
synced 2026-07-05 23:30:26 +01:00
client: add eio transport options
This commit is contained in:
4
packages/client/package-lock.json
generated
4
packages/client/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@scrypted/client",
|
||||
"version": "1.1.19",
|
||||
"version": "1.1.20",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@scrypted/client",
|
||||
"version": "1.1.19",
|
||||
"version": "1.1.20",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@scrypted/types": "^0.2.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scrypted/client",
|
||||
"version": "1.1.19",
|
||||
"version": "1.1.20",
|
||||
"description": "",
|
||||
"main": "dist/packages/client/src/index.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -66,6 +66,7 @@ export interface ScryptedLoginOptions extends ScryptedConnectionOptions {
|
||||
export interface ScryptedClientOptions extends Partial<ScryptedLoginOptions> {
|
||||
pluginId: string;
|
||||
clientName?: string;
|
||||
transports?: string[];
|
||||
}
|
||||
|
||||
function isRunningStandalone() {
|
||||
@@ -198,6 +199,7 @@ export async function connectScryptedClient(options: ScryptedClientOptions): Pro
|
||||
withCredentials: true,
|
||||
extraHeaders,
|
||||
rejectUnauthorized: false,
|
||||
transports: options?.transports,
|
||||
};
|
||||
|
||||
const explicitBaseUrl = baseUrl || `${globalThis.location.protocol}//${globalThis.location.host}`;
|
||||
@@ -214,6 +216,7 @@ export async function connectScryptedClient(options: ScryptedClientOptions): Pro
|
||||
withCredentials: true,
|
||||
extraHeaders,
|
||||
rejectUnauthorized: false,
|
||||
transports: options?.transports,
|
||||
};
|
||||
|
||||
let sockets: IOClientSocket[] = [];
|
||||
@@ -252,6 +255,7 @@ export async function connectScryptedClient(options: ScryptedClientOptions): Pro
|
||||
withCredentials: true,
|
||||
extraHeaders,
|
||||
rejectUnauthorized: false,
|
||||
transports: options?.transports,
|
||||
};
|
||||
const check = new eio.Socket(explicitBaseUrl, webrtcEioOptions);
|
||||
sockets.push(check);
|
||||
|
||||
Reference in New Issue
Block a user