Skip to content

Commit

Permalink
fix: setup webocket instance as an array
Browse files Browse the repository at this point in the history
- to handle mulitple clients
  • Loading branch information
ZanzyTHEbar committed Feb 2, 2023
1 parent 07377a9 commit 38b6fe5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GUI/ETVR/src/store/api/websocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { sendToRTCServer } from '@utils/hooks/websocket'
const PORT = 7856

export interface IWebSocket {
ws: WebSocket
ws: WebSocket[]
pc?: RTCPeerConnection
dc?: RTCDataChannel
status: RTCState
Expand All @@ -18,7 +18,7 @@ export interface IWebSocket {
}

export const defaultState: IWebSocket = {
ws: new WebSocket(`ws://127.0.0.1:${PORT}/camera/`),
ws: [new WebSocket(`ws://127.0.0.1:${PORT}/camera/`)],
status: RTCState.DISCONNECTED,
messageType: RTCMessageType.VIDEO_OFFER,
camStream: null,
Expand Down

0 comments on commit 38b6fe5

Please sign in to comment.