Skip to content

Commit

Permalink
wss
Browse files Browse the repository at this point in the history
  • Loading branch information
mayarajan3 committed Jan 13, 2025
1 parent 5275724 commit 5e7fcd0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions extensions/src/doodlebot/Doodlebot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ export default class Doodlebot {

async connectToImageWebSocket(ip: string) {
// Create a WebSocket connection
this.websocket = new WebSocket(`ws://${ip}:${port.camera}`);
this.websocket = new WebSocket(`wss://${ip}:${port.camera}`);

// Return a promise that resolves when the WebSocket is connected
await this.untilFinishedPending("image", new Promise<void>((resolve, reject) => {
Expand Down Expand Up @@ -740,7 +740,7 @@ export default class Doodlebot {

if (this.audioSocket) return true;

const socket = new WebSocket(`ws://${this.connection.ip}:${port.audio}`);
const socket = new WebSocket(`wss://${this.connection.ip}:${port.audio}`);
const self = this;

socket.onopen = function (event) {
Expand Down
2 changes: 1 addition & 1 deletion extensions/src/doodlebot/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const base64ToInt32Array = async (base64) => {
return new Int32Array(arrayBuffer);
}

export const makeWebsocket = (ip: string, port: string | number) => new WebSocket(`ws://${ip}:${port}`);
export const makeWebsocket = (ip: string, port: string | number) => new WebSocket(`wss://${ip}:${port}`);

export const testWebSocket = (ip: string, port: string | number, timeoutSeconds?: number) => {
const websocket = makeWebsocket(ip, port);
Expand Down

0 comments on commit 5e7fcd0

Please sign in to comment.