From 02994bedb2f53a808ca6336391b63ee5674e0fc2 Mon Sep 17 00:00:00 2001 From: Maya Rajan Date: Mon, 13 Jan 2025 17:08:47 -0500 Subject: [PATCH] ws --- extensions/src/doodlebot/Doodlebot.ts | 4 ++-- extensions/src/doodlebot/utils.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/src/doodlebot/Doodlebot.ts b/extensions/src/doodlebot/Doodlebot.ts index a323d59f0..e88b3ef1c 100644 --- a/extensions/src/doodlebot/Doodlebot.ts +++ b/extensions/src/doodlebot/Doodlebot.ts @@ -561,7 +561,7 @@ export default class Doodlebot { async connectToImageWebSocket(ip: string) { // Create a WebSocket connection - this.websocket = new WebSocket(`wss://${ip}:${port.camera}`); + this.websocket = new WebSocket(`ws://${ip}:${port.camera}`); // Return a promise that resolves when the WebSocket is connected await this.untilFinishedPending("image", new Promise((resolve, reject) => { @@ -740,7 +740,7 @@ export default class Doodlebot { if (this.audioSocket) return true; - const socket = new WebSocket(`wss://${this.connection.ip}:${port.audio}`); + const socket = new WebSocket(`ws://${this.connection.ip}:${port.audio}`); const self = this; socket.onopen = function (event) { diff --git a/extensions/src/doodlebot/utils.ts b/extensions/src/doodlebot/utils.ts index b8f25272c..7b903ed35 100644 --- a/extensions/src/doodlebot/utils.ts +++ b/extensions/src/doodlebot/utils.ts @@ -24,7 +24,7 @@ export const base64ToInt32Array = async (base64) => { return new Int32Array(arrayBuffer); } -export const makeWebsocket = (ip: string, port: string | number) => new WebSocket(`wss://${ip}:${port}`); +export const makeWebsocket = (ip: string, port: string | number) => new WebSocket(`ws://${ip}:${port}`); export const testWebSocket = (ip: string, port: string | number, timeoutSeconds?: number) => { const websocket = makeWebsocket(ip, port);