@scrypted/client
Advanced tools
Comparing version 1.0.30 to 1.0.31
@@ -12,2 +12,3 @@ import { ScryptedStatic } from "@scrypted/types"; | ||
export interface ScryptedConnectionOptions { | ||
webrtc?: boolean; | ||
baseUrl: string; | ||
@@ -14,0 +15,0 @@ axiosConfig?: AxiosRequestConfig; |
@@ -101,3 +101,3 @@ "use strict"; | ||
let addresses; | ||
let trySideband; | ||
let scryptedCloud; | ||
if (username && password) { | ||
@@ -108,3 +108,3 @@ const loginResult = await loginScryptedClient(options); | ||
addresses = loginResult.addresses; | ||
trySideband = loginResult.scryptedCloud; | ||
scryptedCloud = loginResult.scryptedCloud; | ||
} | ||
@@ -116,3 +116,3 @@ else { | ||
addresses = loginCheck.addresses; | ||
trySideband = loginCheck.scryptedCloud; | ||
scryptedCloud = loginCheck.scryptedCloud; | ||
} | ||
@@ -130,3 +130,3 @@ let socket; | ||
let rpcPeer; | ||
if (trySideband) { | ||
if (scryptedCloud || options.webrtc) { | ||
const publicEioOptions = { | ||
@@ -133,0 +133,0 @@ path: `${endpointPath}/public/engine.io/api`, |
{ | ||
"name": "@scrypted/client", | ||
"version": "1.0.30", | ||
"version": "1.0.31", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/packages/client/src/index.js", |
@@ -46,2 +46,3 @@ import { ScryptedStatic } from "@scrypted/types"; | ||
export interface ScryptedConnectionOptions { | ||
webrtc?: boolean; | ||
baseUrl: string; | ||
@@ -115,3 +116,3 @@ axiosConfig?: AxiosRequestConfig; | ||
let addresses: string[]; | ||
let trySideband: boolean; | ||
let scryptedCloud: boolean; | ||
@@ -123,3 +124,3 @@ if (username && password) { | ||
addresses = loginResult.addresses; | ||
trySideband = loginResult.scryptedCloud; | ||
scryptedCloud = loginResult.scryptedCloud; | ||
} | ||
@@ -131,3 +132,3 @@ else { | ||
addresses = loginCheck.addresses; | ||
trySideband = loginCheck.scryptedCloud; | ||
scryptedCloud = loginCheck.scryptedCloud; | ||
} | ||
@@ -149,3 +150,3 @@ | ||
let rpcPeer: RpcPeer; | ||
if (trySideband) { | ||
if (scryptedCloud || options.webrtc) { | ||
const publicEioOptions: Partial<SocketOptions> = { | ||
@@ -152,0 +153,0 @@ path: `${endpointPath}/public/engine.io/api`, |
Sorry, the diff of this file is not supported yet
304848
3138