From 463cd9e2c22da870baf0b37d0ca4955aa1732aa2 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Mon, 12 Dec 2022 22:41:22 -0800 Subject: [PATCH] client: add eio transport options --- packages/client/package-lock.json | 4 ++-- packages/client/package.json | 2 +- packages/client/src/index.ts | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/client/package-lock.json b/packages/client/package-lock.json index 67e202259..35489f082 100644 --- a/packages/client/package-lock.json +++ b/packages/client/package-lock.json @@ -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", diff --git a/packages/client/package.json b/packages/client/package.json index a1bd6f24f..a5fcfe9ae 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@scrypted/client", - "version": "1.1.19", + "version": "1.1.20", "description": "", "main": "dist/packages/client/src/index.js", "scripts": { diff --git a/packages/client/src/index.ts b/packages/client/src/index.ts index 14170c2ed..085cc6a3f 100644 --- a/packages/client/src/index.ts +++ b/packages/client/src/index.ts @@ -66,6 +66,7 @@ export interface ScryptedLoginOptions extends ScryptedConnectionOptions { export interface ScryptedClientOptions extends Partial { 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);