You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dist/src/components/VideoCall.d.ts
-2Lines changed: 0 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,6 @@
8
8
*
9
9
* The WebSocket message event will filter through various events to determine the payloads that will be sent to other serverside socket connection via WebSocket.
10
10
*
11
-
* @type {object} ws is the mutable ref object that contains the WebSocket object (ws.current). The ws.current WebSocket object will be created using the useEffect hook and it will establish the WebSocket connection to the server.
12
-
* ws.current.send enqueues the specified messages that need to be transmitted to the server over the WebSocket connection and this WebSocket connection is connected to the server by using RTConnect's importable SignalingChannel module.
13
11
* @type {state} username - username state stores the name the client enters. All users (see getUsers) will be able to see an updated list of all other users whenever a new user logs in or leaves.
14
12
* @type {state} users - users state is the list of connected users that is rendered on the frontend.
* The WebSocket message event will filter through various events to determine the payloads that will be sent to other serverside socket connection via WebSocket.
54
54
*
55
-
* @type {object} ws is the mutable ref object that contains the WebSocket object (ws.current). The ws.current WebSocket object will be created using the useEffect hook and it will establish the WebSocket connection to the server.
56
-
* ws.current.send enqueues the specified messages that need to be transmitted to the server over the WebSocket connection and this WebSocket connection is connected to the server by using RTConnect's importable SignalingChannel module.
57
55
* @type {state} username - username state stores the name the client enters. All users (see getUsers) will be able to see an updated list of all other users whenever a new user logs in or leaves.
58
56
* @type {state} users - users state is the list of connected users that is rendered on the frontend.
* @type {mutable ref WebSocket object} ws contains the WebSocket object (ws.current). It cannot be null or undefined.
67
+
* @type {mutable ref WebSocket object} ws is the mutable ref object that contains the WebSocket object (ws.current). It cannot be null or undefined.
70
68
*
71
-
* The ws.current WebSocket object will be created using the useEffect hook and it will establish the WebSocket connection to the server.
69
+
* @desc The ws.current WebSocket object is created using the useEffect hook and it will establish the WebSocket connection to the server. This WebSocket connection is made on component mount and the function openUserMedia is invoked, which makes a permissions request for the client's video and audio.
70
+
*
71
+
* ws.current.send enqueues the specified messages that need to be transmitted to the server over the WebSocket connection and this WebSocket connection is connected to the server by using RTConnect's importable SignalingChannel module.
* Note: Media is attached to the Peer Connection and sent along with the offers/answers to describe what media each client has. (see RTCPeerConnection.addTrack() MDN)
134
129
*/
135
130
/**
136
-
* @desc An event triggered on a button click.
137
-
* Once the client enters and submits a name in the username field, this name is set stored in the
138
-
* WebSocketServer along with the socket that sent the name to later send messages to the right client
139
-
* using this socket.
131
+
* @func handleUsername
132
+
* @desc When the client enters a username and clicks the Submit Username button, a LOGIN event is triggered and the loginPayload is sent via the WebSocketServer (ws.current.send(loginPayload)) to the backend/server.
133
+
*
134
+
* Then, username state is updated with the string stored in the userField variable (the username entered by the client when they clicked the Submit Username).
* @desc When a name is entered and submitted into the input field, this starts the Offer-Answer Model exchange
145
+
* @func handleOffer
146
+
* @desc When a username is entered that the client wants to "Call" and the client clicks the Call button, into the input field, this starts the Offer-Answer Model exchange
* @desc When data (the list of connected users) is received from the WebSocketServer/backend, getUser
167
-
* function is invoked and it updates the userList state so that the list of currently connected users
168
-
* can be displayed on the frontend.
169
-
* @param {Array<string>} parsedData - data (the array of usernames that are connected) that is
170
-
* returned from backend/WebSocketServer.
159
+
* @desc When data (the list of connected users) is received from the WebSocketServer/backend, getUser function is invoked and it updates the userList state so that the list of currently connected users can be displayed on the frontend.
160
+
* @param {Array<string>} parsedData - data (the array of usernames that are connected) that is returned from backend/WebSocketServer.
171
161
* @returns Re-renders the page with the new User List
* The WebSocket message event will filter through various events to determine the payloads that will be sent to other serverside socket connection via WebSocket.
42
42
*
43
-
* @type {object} ws is the mutable ref object that contains the WebSocket object (ws.current). The ws.current WebSocket object will be created using the useEffect hook and it will establish the WebSocket connection to the server.
44
-
* ws.current.send enqueues the specified messages that need to be transmitted to the server over the WebSocket connection and this WebSocket connection is connected to the server by using RTConnect's importable SignalingChannel module.
45
43
* @type {state} username - username state stores the name the client enters. All users (see getUsers) will be able to see an updated list of all other users whenever a new user logs in or leaves.
46
44
* @type {state} users - users state is the list of connected users that is rendered on the frontend.
* @type {mutable ref WebSocket object} ws contains the WebSocket object (ws.current). It cannot be null or undefined.
58
+
* @type {mutable ref WebSocket object} ws is the mutable ref object that contains the WebSocket object (ws.current). It cannot be null or undefined.
61
59
*
62
-
* The ws.current WebSocket object will be created using the useEffect hook and it will establish the WebSocket connection to the server.
60
+
* @desc The ws.current WebSocket object is created using the useEffect hook and it will establish the WebSocket connection to the server. This WebSocket connection is made on component mount and the function openUserMedia is invoked, which makes a permissions request for the client's video and audio.
61
+
*
62
+
* ws.current.send enqueues the specified messages that need to be transmitted to the server over the WebSocket connection and this WebSocket connection is connected to the server by using RTConnect's importable SignalingChannel module.
* Once the client enters and submits a name in the username field, this name is set stored in the
139
-
* WebSocketServer along with the socket that sent the name to later send messages to the right client
140
-
* using this socket.
133
+
* @func handleUsername
134
+
* @desc When the client enters a username and clicks the Submit Username button, a LOGIN event is triggered and the loginPayload is sent via the WebSocketServer (ws.current.send(loginPayload)) to the backend/server.
135
+
*
136
+
* Then, username state is updated with the string stored in the userField variable (the username entered by the client when they clicked the Submit Username).
* @desc When a name is entered and submitted into the input field, this starts the Offer-Answer Model exchange
149
+
* @func handleOffer
150
+
* @desc When a username is entered that the client wants to "Call" and the client clicks the Call button, into the input field, this starts the Offer-Answer Model exchange
* @desc When data (the list of connected users) is received from the WebSocketServer/backend, getUser
173
-
* function is invoked and it updates the userList state so that the list of currently connected users
174
-
* can be displayed on the frontend.
175
-
* @param {Array<string>} parsedData - data (the array of usernames that are connected) that is
176
-
* returned from backend/WebSocketServer.
165
+
* @desc When data (the list of connected users) is received from the WebSocketServer/backend, getUser function is invoked and it updates the userList state so that the list of currently connected users can be displayed on the frontend.
166
+
* @param {Array<string>} parsedData - data (the array of usernames that are connected) that is returned from backend/WebSocketServer.
177
167
* @returns Re-renders the page with the new User List
0 commit comments