2
2
3
3
### Features
4
4
5
- - provide video call function with audio
6
- - startCommunication : server socket events
5
+ - provide audio call
6
+ - startCommunication : server socket events for text based communication
7
7
8
8
### Table of Contents:
9
9
22
22
23
23
#### Listening port
24
24
25
- http://localhost:3003
25
+ http://localhost:3007
26
26
27
27
28
28
#### Start the microservice on local machine by:
29
29
30
- 1 . Navigate to peerprep directory.
30
+ 1 . Navigate to CommunicationService directory.
31
31
32
32
2 . Start the microservice in terminal using commands:
33
33
34
34
```
35
- cd peer-prep\src\backend\communication-service
35
+ cd CommunicationService
36
36
npm install
37
37
npm start
38
38
```
@@ -43,70 +43,90 @@ npm start
43
43
44
44
> node server.js
45
45
46
- Communication service listening on port 3003
46
+ Communication service listening on port 3007
47
47
```
48
48
49
49
4 . End communication service in terminal using ` Ctrl+C ` .
50
50
51
51
52
52
#### For backend self-testing:
53
53
54
- Here demonstrate local testing using Webpage :
54
+ Here demonstrate local testing using Postman :
55
55
56
- ** Note ** :
56
+ 1 . In the history panel of Postman, click ` new ` button and select ` Socket.io ` .
57
57
58
- > This testing only available currently.
58
+ 2 . Add events to listen include:
59
59
60
- 1 . Follow step 1 to step 3 in [ Initiate Communication Service - Local Machine] ( #start-the-microservice-on-local-machine-by ) .
60
+ - join
61
+ - collaborator-joined
62
+ - collaborator-recv-join
63
+ - new-message
64
+ - recv-message-log
65
+ - called
66
+ - answered
67
+ - colllaborator-end-call
68
+ - call-rejected
69
+ - collaborator-disconnected
70
+ - ice-candidate
61
71
62
- 2 . In browser, create 2 webpage with url: ` http://localhost:3003 ` .
72
+ 3 . Connect clients to server:
63
73
64
- 3 . Wait until ` Call Collaborator panel ` is initialized.
74
+ Url 1: http://localhost:3007?sessionId=123c44c9-9bc3-402f-ba56-689eb0d2774d&userId=Gc2Bz9Nl8Wx4
65
75
66
- 4 . Click on the ` Call Collaborator panel ` once in one of the pages, local video will be initiated.
76
+ Url 2: http://localhost:3007?sessionId=123c44c9-9bc3-402f-ba56-689eb0d2774d&userId=PxJ3lVtWz8Kq
67
77
68
- 5 . The ` Accept Button ` in the other page will be enabled, click it.
78
+ 4 . Test events using the message panel:
69
79
70
- 6 . Video call is enabled now.
80
+ - recv-join
71
81
72
- 7 . Stop video call by clicking the ` End Button ` . Video call will be ended for both clients.
82
+ - message
73
83
74
- 8 . End communication service in terminal using ` Ctrl+C ` .
84
+ Arg1: string
85
+
86
+ - get-message-log
75
87
88
+ - call
76
89
77
- #### Jest testing
90
+ Arg1: any
78
91
79
- 1 . Two terminal windows are required for Jest testing.
92
+ - answer
80
93
81
- 2 . Initiate the communication service in first window by:
94
+ Arg1: any
82
95
83
- ```
84
- cd peer-prep\src\backend\communication-service
85
- npm start
86
- ```
96
+ - end-call
97
+
98
+ - reject-call
99
+
100
+ - disconnect
101
+
102
+ - ice-candidate
103
+ Arg1: any
104
+
105
+
106
+ #### Jest testing
87
107
88
- 3 . Test the service in the other window using terminal commands:
108
+ 1 . Test the service using terminal commands:
89
109
90
110
```
91
- cd peer-prep\src\backend\communication-service
111
+ cd CommunicationService
92
112
npm test
93
113
```
94
114
95
- 4 . Quit the server after finished testing using ` Ctrl+C ` .
115
+ 2 . Quit the server after finished testing using ` Ctrl+C ` .
96
116
97
117
98
118
#### Running in Docker
99
119
100
120
** Note** :
101
121
102
- > Please delete the containers for other microservices .
122
+ > Please ensure that there are no active container of the required services .
103
123
104
- 1 . Navigate to peerprep directory.
124
+ 1 . Navigate to CommunicationService directory.
105
125
106
126
2 . Start the microservice in terminal using commands:
107
127
108
128
```
109
- cd peer-prep\src\backend\communication-service
129
+ cd CommunicationService
110
130
docker-compose up --build
111
131
```
112
132
@@ -115,7 +135,7 @@ docker-compose up --build
115
135
```
116
136
117
137
> node server.js
118
- > Communication service listening on port 3003
138
+ > Communication service listening on port 3007
119
139
```
120
140
121
141
4 . End communication service in terminal using ` Ctrl+C ` twice.
0 commit comments