diff --git a/modules/renderer/ExternalModalHandler.ts b/modules/renderer/ExternalModalHandler.ts index 1738060..7bbe9d6 100644 --- a/modules/renderer/ExternalModalHandler.ts +++ b/modules/renderer/ExternalModalHandler.ts @@ -2,8 +2,8 @@ import {AbstractExternalModalController} from "tc-shared/ui/react-elements/exter import {Popout2ControllerMessages, PopoutIPCMessage} from "tc-shared/ui/react-elements/external-modal/IPCMessage"; import {ExternalModal, kIPCChannelExternalModal} from "../shared/ipc/ExternalModal"; import {ObjectProxyClient} from "../shared/proxy/Client"; -import * as ipc from "tc-shared/ipc/BrowserIPC"; import {ProxiedClass} from "../shared/proxy/Definitions"; +import {getIpcInstance} from "tc-shared/ipc/BrowserIPC"; const modalClient = new ObjectProxyClient(kIPCChannelExternalModal); modalClient.initialize(); @@ -25,7 +25,7 @@ export class ExternalModalController extends AbstractExternalModalController { "chunk": "modal-external", "modal-target": this.modalType, "ipc-channel": this.ipcChannel.channelId, - "ipc-address": ipc.getInstance().getLocalAddress(), + "ipc-address": getIpcInstance().getLocalAddress(), "loader-abort": 0, "animation-short": 1 }; diff --git a/modules/renderer/PersistentLocalStorage.ts b/modules/renderer/PersistentLocalStorage.ts index 48c9948..76bbbb3 100644 --- a/modules/renderer/PersistentLocalStorage.ts +++ b/modules/renderer/PersistentLocalStorage.ts @@ -7,7 +7,7 @@ const SETTINGS_DIR = path.join(APP_DATA, "settings"); let _local_storage: {[key: string]: any} = {}; let _local_storage_save: {[key: string]: boolean} = {}; -let _save_timer: NodeJS.Timer; +let _save_timer: number; export async function initialize() { await fs.mkdirp(SETTINGS_DIR); diff --git a/modules/renderer/WindowsTrayHandler.ts b/modules/renderer/WindowsTrayHandler.ts index e3c40bb..0f3a2d5 100644 --- a/modules/renderer/WindowsTrayHandler.ts +++ b/modules/renderer/WindowsTrayHandler.ts @@ -141,7 +141,7 @@ function initializeConnection(connection: ConnectionHandler) { })); eventListener.push(connection.events().on("notify_connection_state_changed", event => { - showClientStatus = event.new_state === ConnectionState.CONNECTED; + showClientStatus = event.newState === ConnectionState.CONNECTED; updateTray(); updateContextMenu(); })); diff --git a/modules/renderer/connection/ServerConnection.ts b/modules/renderer/connection/ServerConnection.ts index 60eb797..6afa2df 100644 --- a/modules/renderer/connection/ServerConnection.ts +++ b/modules/renderer/connection/ServerConnection.ts @@ -2,7 +2,7 @@ import {AbstractCommandHandler, AbstractCommandHandlerBoss} from "tc-shared/conn import { AbstractServerConnection, CommandOptionDefaults, - CommandOptions, + CommandOptions, ConnectionPing, ConnectionStatistics, ServerCommand } from "tc-shared/connection/ConnectionBase"; @@ -360,9 +360,10 @@ export class ServerConnection extends AbstractServerConnection { return this.defaultCommandHandler.proxy_command_promise(promise, options); } - ping(): { native: number; javascript?: number } { + ping(): ConnectionPing { return { - native: this.nativeHandle ? (this.nativeHandle.current_ping() / 1000) : -2 + native: this.nativeHandle ? (this.nativeHandle.current_ping() / 1000) : -2, + javascript: undefined }; } diff --git a/modules/renderer/hooks/Video.ts b/modules/renderer/hooks/Video.ts index 2317ed9..86908ff 100644 --- a/modules/renderer/hooks/Video.ts +++ b/modules/renderer/hooks/Video.ts @@ -57,6 +57,8 @@ class NativeVideoDriver extends WebVideoDriver { } const name = this.currentScreenCaptureDevices.find(e => e.id === id)?.name || tr("Screen device"); - return new WebVideoSource(id, name, result); + const source = new WebVideoSource(id, name, result); + await source.applyDefaultResolution(); + return source; } } \ No newline at end of file