Commit dc7f013460ed6345b3f8608c69789e3c515bbeef
1 parent
8b7976c3a4
Exists in
master
and in
2 other branches
orignal video confrence
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
src/pages/Dashboard/LiveOnlineClass.vue
1 | <template> | 1 | <template> |
2 | <div class="body-color"> | 2 | <div class="body-color"> |
3 | <!-- LOADER --> | 3 | <!-- LOADER --> |
4 | <div class="loader" v-if="showLoader"> | 4 | <div class="loader" v-if="showLoader"> |
5 | <v-progress-circular indeterminate color="white"></v-progress-circular> | 5 | <v-progress-circular indeterminate color="white"></v-progress-circular> |
6 | </div> | 6 | </div> |
7 | 7 | ||
8 | <!-- SNACKBAR --> | 8 | <!-- SNACKBAR --> |
9 | <v-snackbar | 9 | <v-snackbar |
10 | :timeout="timeout" | 10 | :timeout="timeout" |
11 | :top="y === 'top'" | 11 | :top="y === 'top'" |
12 | :right="x === 'right'" | 12 | :right="x === 'right'" |
13 | :vertical="mode === 'vertical'" | 13 | :vertical="mode === 'vertical'" |
14 | v-model="snackbar" | 14 | v-model="snackbar" |
15 | :color="snackbarColor" | 15 | :color="snackbarColor" |
16 | > | 16 | > |
17 | {{ text }} | 17 | {{ text }} |
18 | <v-spacer></v-spacer> | 18 | <v-spacer></v-spacer> |
19 | <v-btn flat text @click="snackbar = false">X</v-btn> | 19 | <v-btn flat text @click="snackbar = false">X</v-btn> |
20 | </v-snackbar> | 20 | </v-snackbar> |
21 | 21 | ||
22 | <v-container grid-list-xl class="pt-0"> | 22 | <v-container grid-list-xl class="pt-0"> |
23 | <v-layout row wrap class="mt-1"> | 23 | <v-layout row wrap class="mt-1"> |
24 | <!-- if logged in user is parent --> | 24 | <!-- if logged in user is parent --> |
25 | <v-flex xs12 sm12 md9 v-if=" $store.state.role === 'PARENT' "> | 25 | <v-flex xs12 sm12 md9 v-if=" $store.state.role === 'PARENT' "> |
26 | <v-layout column> | 26 | <v-layout column> |
27 | <!-- HEADING --> | 27 | <!-- HEADING --> |
28 | <v-flex> | 28 | <v-flex> |
29 | <div | 29 | <div |
30 | class="title side-bar-color font-weight-bold" | 30 | class="title side-bar-color font-weight-bold" |
31 | >Live Online Classes - {{$route.query.chapterName}}</div> | 31 | >Live Online Classes - {{$route.query.chapterName}}</div> |
32 | <!-- <div class="subheading grey--text lighten-1">{{liveLink}}</div> --> | 32 | <!-- <div class="subheading grey--text lighten-1">{{liveLink}}</div> --> |
33 | <!-- <div | 33 | <!-- <div |
34 | class="subheading grey--text lighten-1" | 34 | class="subheading grey--text lighten-1" |
35 | >The session started at 1:00 there is 1 moderator</div>--> | 35 | >The session started at 1:00 there is 1 moderator</div>--> |
36 | </v-flex> | 36 | </v-flex> |
37 | 37 | ||
38 | <!-- JOIN OR END SESSION --> | 38 | <!-- JOIN OR END SESSION --> |
39 | <v-flex> | 39 | <v-flex> |
40 | <div> | 40 | <div> |
41 | <v-btn | 41 | <v-btn |
42 | round | 42 | round |
43 | class="open-dialog-button" | 43 | class="open-dialog-button" |
44 | dark | 44 | dark |
45 | v-if="studentBtn" | 45 | v-if="studentBtn" |
46 | @click="showLoader = true;startChat();" | 46 | @click="showLoader = true;startChat();" |
47 | >{{studentBtn}}</v-btn> | 47 | >{{studentBtn}}</v-btn> |
48 | <span class="subheading grey--twxt lighten-1" v-else>Session hasnt started yet</span> | 48 | <span class="subheading grey--twxt lighten-1" v-else>Session hasnt started yet</span> |
49 | </div> | 49 | </div> |
50 | </v-flex> | 50 | </v-flex> |
51 | <v-flex id="studentClone"> | 51 | <v-flex id="studentClone"> |
52 | <div id="jitsi-container"></div> | 52 | <div id="jitsi-container"></div> |
53 | </v-flex> | 53 | </v-flex> |
54 | </v-layout> | 54 | </v-layout> |
55 | </v-flex> | 55 | </v-flex> |
56 | 56 | ||
57 | <!-- if logged in user is teacher --> | 57 | <!-- if logged in user is teacher --> |
58 | <v-flex xs12 sm12 md12 v-else> | 58 | <v-flex xs12 sm12 md12 v-else> |
59 | <v-layout column> | 59 | <v-layout column> |
60 | <!-- HEADING --> | 60 | <!-- HEADING --> |
61 | <v-flex> | 61 | <v-flex> |
62 | <div | 62 | <div |
63 | class="title side-bar-color font-weight-bold" | 63 | class="title side-bar-color font-weight-bold" |
64 | >Live Online Classes - {{$route.query.chapterName}}</div> | 64 | >Live Online Classes - {{$route.query.chapterName}}</div> |
65 | <!-- <div class="subheading grey--text lighten-1"></div> --> | 65 | <!-- <div class="subheading grey--text lighten-1"></div> --> |
66 | <!-- <div | 66 | <!-- <div |
67 | class="subheading grey--text lighten-1" | 67 | class="subheading grey--text lighten-1" |
68 | >The session started at 1:00 there is 1 moderator</div>--> | 68 | >The session started at 1:00 there is 1 moderator</div>--> |
69 | </v-flex> | 69 | </v-flex> |
70 | 70 | ||
71 | <!-- JOIN OR END SESSION --> | 71 | <!-- JOIN OR END SESSION --> |
72 | <v-flex> | 72 | <v-flex> |
73 | <div> | 73 | <div> |
74 | <v-btn | 74 | <v-btn |
75 | round | 75 | round |
76 | class="open-dialog-button" | 76 | class="open-dialog-button" |
77 | dark | 77 | dark |
78 | @click="showLoader = true;startChat()" | 78 | @click="showLoader = true;startChat()" |
79 | >Start Session</v-btn> | 79 | >Start Session</v-btn> |
80 | </div> | 80 | </div> |
81 | </v-flex> | 81 | </v-flex> |
82 | <v-flex id="teacherClone"> | 82 | <v-flex id="teacherClone"> |
83 | <div id="jitsi-container"></div> | 83 | <div id="jitsi-container"></div> |
84 | </v-flex> | 84 | </v-flex> |
85 | </v-layout> | 85 | </v-layout> |
86 | </v-flex> | 86 | </v-flex> |
87 | 87 | ||
88 | <v-spacer></v-spacer> | 88 | <v-spacer></v-spacer> |
89 | 89 | ||
90 | <!-- COURSES SIDE BAR- positioned to the right of the page --> | 90 | <!-- COURSES SIDE BAR- positioned to the right of the page --> |
91 | <!-- <v-flex xs3> | 91 | <!-- <v-flex xs3> |
92 | <v-card class="elevation-0 card-border" height="100%"> | 92 | <v-card class="elevation-0 card-border" height="100%"> |
93 | <CoursesSideBar></CoursesSideBar> | 93 | <CoursesSideBar></CoursesSideBar> |
94 | </v-card> | 94 | </v-card> |
95 | </v-flex>--> | 95 | </v-flex>--> |
96 | </v-layout> | 96 | </v-layout> |
97 | </v-container> | 97 | </v-container> |
98 | </div> | 98 | </div> |
99 | </template> | 99 | </template> |
100 | <script> | 100 | <script> |
101 | import AllApiCalls from "@/Services/AllApiCalls.js"; | 101 | import AllApiCalls from "@/Services/AllApiCalls.js"; |
102 | import http from "@/Services/http.js"; | 102 | import http from "@/Services/http.js"; |
103 | import moment from "moment"; | 103 | import moment from "moment"; |
104 | import Meet from "@/pages/Meet/meet.vue"; | 104 | import Meet from "@/pages/Meet/meet.vue"; |
105 | import CoursesSideBar from "@/pages/Common/CoursesSideBar.vue"; | 105 | import CoursesSideBar from "@/pages/Common/CoursesSideBar.vue"; |
106 | export default { | 106 | export default { |
107 | mixins: [AllApiCalls], | 107 | mixins: [AllApiCalls], |
108 | components: { | 108 | components: { |
109 | CoursesSideBar, | 109 | CoursesSideBar, |
110 | }, | 110 | }, |
111 | data() { | 111 | data() { |
112 | return { | 112 | return { |
113 | startLiveSession: "", | 113 | startLiveSession: "", |
114 | studentBtn: "", | 114 | studentBtn: "", |
115 | 115 | ||
116 | // DATA TABLE | 116 | // DATA TABLE |
117 | search: "", | 117 | search: "", |
118 | pagination: { | 118 | pagination: { |
119 | rowsPerPage: 10, | 119 | rowsPerPage: 10, |
120 | }, | 120 | }, |
121 | liveOnlineHeaders: [ | 121 | liveOnlineHeaders: [ |
122 | { | 122 | { |
123 | text: "Playback", | 123 | text: "Playback", |
124 | value: "attachementUrl", | 124 | value: "attachementUrl", |
125 | sortable: false, | 125 | sortable: false, |
126 | align: "center", | 126 | align: "center", |
127 | }, | 127 | }, |
128 | { | 128 | { |
129 | text: "Meeting", | 129 | text: "Meeting", |
130 | align: "center", | 130 | align: "center", |
131 | sortable: false, | 131 | sortable: false, |
132 | value: "", | 132 | value: "", |
133 | }, | 133 | }, |
134 | { | 134 | { |
135 | text: "Recording", | 135 | text: "Recording", |
136 | value: "", | 136 | value: "", |
137 | sortable: false, | 137 | sortable: false, |
138 | align: "center", | 138 | align: "center", |
139 | }, | 139 | }, |
140 | { | 140 | { |
141 | text: "Description Preview", | 141 | text: "Description Preview", |
142 | value: "", | 142 | value: "", |
143 | sortable: false, | 143 | sortable: false, |
144 | align: "center", | 144 | align: "center", |
145 | }, | 145 | }, |
146 | { text: "Date", value: "", sortable: false, align: "center" }, | 146 | { text: "Date", value: "", sortable: false, align: "center" }, |
147 | { text: "Duration", value: "", sortable: false, align: "center" }, | 147 | { text: "Duration", value: "", sortable: false, align: "center" }, |
148 | { text: "Toolbar", value: "", sortable: false, align: "center" }, | 148 | { text: "Toolbar", value: "", sortable: false, align: "center" }, |
149 | ], | 149 | ], |
150 | liveOnlineItems: [], | 150 | liveOnlineItems: [], |
151 | 151 | ||
152 | // JITSI CONTAINER | 152 | // JITSI CONTAINER |
153 | liveLink: "", | 153 | liveLink: "", |
154 | token: "", | 154 | token: "", |
155 | selectStudents: {}, | 155 | selectStudents: {}, |
156 | classRules: [(v) => !!v || " Class Name is required"], | 156 | classRules: [(v) => !!v || " Class Name is required"], |
157 | sectionRules: [(v) => !!v || " Section Name is required"], | 157 | sectionRules: [(v) => !!v || " Section Name is required"], |
158 | addclass: [], | 158 | addclass: [], |
159 | addSection: [], | 159 | addSection: [], |
160 | loading: false, | 160 | loading: false, |
161 | room: "", | 161 | room: "", |
162 | username: "", | 162 | username: "", |
163 | roomPassword: "", | 163 | roomPassword: "", |
164 | counter: 0, | 164 | counter: 0, |
165 | }; | 165 | }; |
166 | }, | 166 | }, |
167 | methods: { | 167 | methods: { |
168 | async startChat() { | 168 | async startChat() { |
169 | if (this.$store.state.role === "PARENT") { | 169 | if (this.$store.state.role === "PARENT") { |
170 | if (this.counter == 0) { | 170 | if (this.counter == 0) { |
171 | // console.log("enter start chat"); | 171 | // console.log("enter start chat"); |
172 | this.startConference(); | 172 | this.startConference(); |
173 | this.counter += 1; | 173 | this.counter += 1; |
174 | } | 174 | } |
175 | } | 175 | } |
176 | if (this.$store.state.role === "TEACHER") { | 176 | if (this.$store.state.role === "TEACHER") { |
177 | if (this.counter == 0) { | 177 | if (this.counter == 0) { |
178 | this.createRoom(); | 178 | this.createRoom(); |
179 | this.counter += 1; | 179 | this.counter += 1; |
180 | } | 180 | } |
181 | } | 181 | } |
182 | }, | 182 | }, |
183 | // JITSI CONTAINER | 183 | // JITSI CONTAINER |
184 | startConference() { | 184 | startConference() { |
185 | // console.log("yes session started"); | 185 | // console.log("yes session started"); |
186 | var _this = this; | 186 | var _this = this; |
187 | try { | 187 | try { |
188 | const domain = "meet.intrack.in"; | 188 | const domain = "meet.intrack.in"; |
189 | const options = { | 189 | const options = { |
190 | audioInput: "<deviceLabel>", | 190 | audioInput: "<deviceLabel>", |
191 | audioOutput: "<deviceLabel>", | 191 | audioOutput: "<deviceLabel>", |
192 | videoInput: "<deviceLabel>", | 192 | videoInput: "<deviceLabel>", |
193 | prejoinPageEnabled: false, | 193 | prejoinPageEnabled: false, |
194 | roomName: this.room, | 194 | roomName: this.room, |
195 | height: 500, | 195 | height: 500, |
196 | parentNode: document.getElementById("jitsi-container"), | 196 | parentNode: document.getElementById("jitsi-container"), |
197 | interfaceConfigOverwrite: { | 197 | interfaceConfigOverwrite: { |
198 | filmStripOnly: false, | 198 | filmStripOnly: false, |
199 | SHOW_PROMOTIONAL_CLOSE_PAGE: false, | 199 | SHOW_PROMOTIONAL_CLOSE_PAGE: false, |
200 | SHOW_POWERED_BY: false, | 200 | SHOW_POWERED_BY: false, |
201 | SHOW_JITSI_WATERMARK: false, | 201 | SHOW_JITSI_WATERMARK: false, |
202 | TOOLBAR_BUTTONS: [ | 202 | TOOLBAR_BUTTONS: [ |
203 | "microphone", | 203 | "microphone", |
204 | "camera", | 204 | "camera", |
205 | "closedcaptions", | 205 | "closedcaptions", |
206 | "desktop", | 206 | "desktop", |
207 | "fullscreen", | 207 | "fullscreen", |
208 | "fodeviceselection", | 208 | "fodeviceselection", |
209 | "hangup", | 209 | "hangup", |
210 | "profile", | 210 | "profile", |
211 | "info", | 211 | "info", |
212 | "chat", | 212 | "chat", |
213 | "recording", | 213 | "recording", |
214 | "livestreaming", | 214 | "livestreaming", |
215 | "etherpad", | 215 | "etherpad", |
216 | "sharedvideo", | 216 | "sharedvideo", |
217 | "settings", | 217 | "settings", |
218 | "raisehand", | 218 | "raisehand", |
219 | "videoquality", | 219 | "videoquality", |
220 | "filmstrip", | 220 | "filmstrip", |
221 | "invite", | 221 | "invite", |
222 | "feedback", | 222 | "feedback", |
223 | "stats", | 223 | "stats", |
224 | "shortcuts", | 224 | "shortcuts", |
225 | "tileview", | 225 | "tileview", |
226 | ], | 226 | ], |
227 | }, | 227 | }, |
228 | configOverwrite: { | 228 | configOverwrite: { |
229 | disableSimulcast: false, | 229 | disableSimulcast: false, |
230 | }, | 230 | }, |
231 | teacherName: "", | 231 | teacherName: "", |
232 | romm: "", | 232 | romm: "", |
233 | }; | 233 | }; |
234 | _this.api = new JitsiMeetExternalAPI(domain, options); | 234 | _this.api = new JitsiMeetExternalAPI(domain, options); |
235 | // console.log("this.api ", this.api); | 235 | // console.log("this.api ", this.api); |
236 | _this.api.addEventListener("videoConferenceJoined", () => { | 236 | _this.api.addEventListener("videoConferenceJoined", () => { |
237 | // console.log("Local User Joined"); | 237 | // console.log("Local User Joined"); |
238 | this.showLoader = false; | 238 | this.showLoader = false; |
239 | _this.api.executeCommand("displayName", _this.username); | 239 | _this.api.executeCommand("displayName", _this.username); |
240 | _this.api.executeCommand("password", this_.roomPassword); | 240 | _this.api.executeCommand("password", _this.roomPassword); |
241 | }); | 241 | }); |
242 | 242 | ||
243 | _this.api.on("readyToClose", () => { | 243 | _this.api.on("readyToClose", () => { |
244 | this.$router.push({ name: "Refresh" }); | 244 | this.$router.push({ name: "Refresh" }); |
245 | }); | 245 | }); |
246 | } catch (error) { | 246 | } catch (error) { |
247 | // console.error("Failed to load Jitsi API", error); | 247 | // console.error("Failed to load Jitsi API", error); |
248 | } | 248 | } |
249 | }, | 249 | }, |
250 | openRoom() { | 250 | openRoom() { |
251 | // verify the JitsiMeetExternalAPI constructor is added to the global.. | 251 | // verify the JitsiMeetExternalAPI constructor is added to the global.. |
252 | // if (this.teacherName != "" || this.room != "") { | 252 | // if (this.teacherName != "" || this.room != "") { |
253 | // if (window.JitsiMeetExternalAPI) { | 253 | // if (window.JitsiMeetExternalAPI) { |
254 | // // var person = prompt("Please enter your name:", "Rabie"); | 254 | // // var person = prompt("Please enter your name:", "Rabie"); |
255 | // if (person != null || person != "") this.username = this.teacherName; | 255 | // if (person != null || person != "") this.username = this.teacherName; |
256 | // var room = prompt("Please enter your room:", "Test Room"); | 256 | // var room = prompt("Please enter your room:", "Test Room"); |
257 | // if (room != null || room != "") this.room = this.room; | 257 | // if (room != null || room != "") this.room = this.room; |
258 | // this.startConference(); | 258 | // this.startConference(); |
259 | // } else alert("Jitsi Meet API script not loaded"); | 259 | // } else alert("Jitsi Meet API script not loaded"); |
260 | // } | 260 | // } |
261 | }, | 261 | }, |
262 | 262 | ||
263 | createRoom(classId) { | 263 | createRoom(classId) { |
264 | // this.showLoader = true; | 264 | // this.showLoader = true; |
265 | var classId = { | 265 | var classId = { |
266 | classId: classId, | 266 | classId: classId, |
267 | }; | 267 | }; |
268 | http() | 268 | http() |
269 | .post("/createLiveClasses", { | 269 | .post("/createLiveClasses", { |
270 | classId: this.$route.query.classId, | 270 | classId: this.$route.query.classId, |
271 | courseId: this.$route.query.courseId, | 271 | courseId: this.$route.query.courseId, |
272 | chapterId: this.$route.query.chapterId, | 272 | chapterId: this.$route.query.chapterId, |
273 | }) | 273 | }) |
274 | .then((response) => { | 274 | .then((response) => { |
275 | // this.addSection = response.data.data; | 275 | // this.addSection = response.data.data; |
276 | // console.log("CREATE___ROOOM", response.data); | 276 | // console.log("CREATE___ROOOM", response.data); |
277 | var room = response.data.data.roomName; | 277 | var room = response.data.data.roomName; |
278 | var username = localStorage.getItem("teacherName"); | 278 | var username = localStorage.getItem("teacherName"); |
279 | var roomPassword = response.data.data.password; | 279 | var roomPassword = response.data.data.password; |
280 | // console.log( | 280 | // console.log( |
281 | // "room", | 281 | // "room", |
282 | // room, | 282 | // room, |
283 | // "username", | 283 | // "username", |
284 | // username, | 284 | // username, |
285 | // "roomPassword", | 285 | // "roomPassword", |
286 | // roomPassword | 286 | // roomPassword |
287 | // ); | 287 | // ); |
288 | var this_ = this; | 288 | var this_ = this; |
289 | if (username != "" || room != "") { | 289 | if (username != "" || room != "") { |
290 | if (window.JitsiMeetExternalAPI) { | 290 | if (window.JitsiMeetExternalAPI) { |
291 | // var person = prompt("Please enter your name:", "Rabie"); | 291 | // var person = prompt("Please enter your name:", "Rabie"); |
292 | if (username != null || username != "") { | 292 | if (username != null || username != "") { |
293 | this_.username = username; | 293 | this_.username = username; |
294 | } | 294 | } |
295 | // var room = prompt("Please enter your room:", "Test Room"); | 295 | // var room = prompt("Please enter your room:", "Test Room"); |
296 | if (room != null || room != "") { | 296 | if (room != null || room != "") { |
297 | this_.room = room; | 297 | this_.room = room; |
298 | } | 298 | } |
299 | if (roomPassword != null || roomPassword != "") { | 299 | if (roomPassword != null || roomPassword != "") { |
300 | this_.password = roomPassword; | 300 | this_.password = roomPassword; |
301 | } | 301 | } |
302 | } else alert("Jitsi Meet API script not loaded"); | 302 | } else alert("Jitsi Meet API script not loaded"); |
303 | this_.startConference(); | 303 | this_.startConference(); |
304 | } | 304 | } |
305 | }) | 305 | }) |
306 | .catch((err) => { | 306 | .catch((err) => { |
307 | this.showLoader = false; | 307 | this.showLoader = false; |
308 | }); | 308 | }); |
309 | }, | 309 | }, |
310 | async studentClasses() { | 310 | async studentClasses() { |
311 | this.liveLink = ""; | 311 | this.liveLink = ""; |
312 | this.room = ""; | 312 | this.room = ""; |
313 | this.username = ""; | 313 | this.username = ""; |
314 | this.roomPassword = ""; | 314 | this.roomPassword = ""; |
315 | /* getLiveClassesesList - To up date line under heading*/ | 315 | /* getLiveClassesesList - To up date line under heading*/ |
316 | let response = await this.getLiveClassesesList({ | 316 | let response = await this.getLiveClassesesList({ |
317 | classId: this.$route.query.classId, | 317 | classId: this.$route.query.classId, |
318 | courseId: this.$route.query.courseId, | 318 | courseId: this.$route.query.courseId, |
319 | chapterId: this.$route.query.chapterId, | 319 | chapterId: this.$route.query.chapterId, |
320 | }); | 320 | }); |
321 | // console.log("response getLiveClassesesList- ", response); | 321 | // console.log("response getLiveClassesesList- ", response); |
322 | 322 | ||
323 | /* CHECK RESPONSE TO ASSIGN MESSAGE INSIDE BUTTON */ | 323 | /* CHECK RESPONSE TO ASSIGN MESSAGE INSIDE BUTTON */ |
324 | if (response.data.data[0].sessionStatus == "ENDED") { | 324 | if (response.data.data[0].sessionStatus == "ENDED") { |
325 | // this.startLiveSession = "Start Session"; | 325 | // this.startLiveSession = "Start Session"; |
326 | this.studentBtn = ""; | 326 | this.studentBtn = ""; |
327 | } | 327 | } |
328 | if (response.data.data[0].sessionStatus == "STARTED") { | 328 | if (response.data.data[0].sessionStatus == "STARTED") { |
329 | // this.startLiveSession = "Join Session"; | 329 | // this.startLiveSession = "Join Session"; |
330 | this.studentBtn = "Join Session"; | 330 | this.studentBtn = "Join Session"; |
331 | } | 331 | } |
332 | if (response.data.data.length == 0) { | 332 | if (response.data.data.length == 0) { |
333 | this.startLiveSession = "Start Session"; | 333 | this.startLiveSession = "Start Session"; |
334 | this.studentBtn = ""; | 334 | this.studentBtn = ""; |
335 | } else { | 335 | } else { |
336 | this.liveLink = response.data.data[0].link; | 336 | this.liveLink = response.data.data[0].link; |
337 | var room = response.data.data[0].roomName; | 337 | var room = response.data.data[0].roomName; |
338 | var username = this.currentUser; | 338 | var username = this.currentUser; |
339 | var roomPassword = response.data.data[0].password; | 339 | var roomPassword = response.data.data[0].password; |
340 | var this_ = this; | 340 | var this_ = this; |
341 | // console.log(this.room, this.roomPassword, this.username); | 341 | // console.log(this.room, this.roomPassword, this.username); |
342 | 342 | ||
343 | if (username != "" || room != "") { | 343 | if (username != "" || room != "") { |
344 | if (window.JitsiMeetExternalAPI) { | 344 | if (window.JitsiMeetExternalAPI) { |
345 | // var person = prompt("Please enter your name:", "Rabie"); | 345 | // var person = prompt("Please enter your name:", "Rabie"); |
346 | if (username != null || username != "") { | 346 | if (username != null || username != "") { |
347 | this_.username = username; | 347 | this_.username = username; |
348 | } | 348 | } |
349 | if (roomPassword != null || roomPassword != "") { | 349 | if (roomPassword != null || roomPassword != "") { |
350 | this_.roomPassword = roomPassword; | 350 | this_.roomPassword = roomPassword; |
351 | } | 351 | } |
352 | // var room = prompt("Please enter your room:", "Test Room"); | 352 | // var room = prompt("Please enter your room:", "Test Room"); |
353 | if (room != null || room != "") { | 353 | if (room != null || room != "") { |
354 | this_.room = room; | 354 | this_.room = room; |
355 | } | 355 | } |
356 | // this.startConference(); | 356 | // this.startConference(); |
357 | } | 357 | } |
358 | } | 358 | } |
359 | } | 359 | } |
360 | }, | 360 | }, |
361 | }, | 361 | }, |
362 | 362 | ||
363 | async created() { | 363 | async created() { |
364 | // console.log( | 364 | // console.log( |
365 | // "this.$store.state.studentsData", | 365 | // "this.$store.state.studentsData", |
366 | // this.$store.state.studentsData[0].name | 366 | // this.$store.state.studentsData[0].name |
367 | // ); | 367 | // ); |
368 | this.currentUser = localStorage.getItem("studentName"); | 368 | this.currentUser = localStorage.getItem("studentName"); |
369 | this.token = this.$store.state.token; | 369 | this.token = this.$store.state.token; |
370 | if (this.$store.state.role === "PARENT") { | 370 | if (this.$store.state.role === "PARENT") { |
371 | await this.studentClasses(); | 371 | await this.studentClasses(); |
372 | } | 372 | } |
373 | 373 | ||
374 | /* getStudentCourses - to get courseData - defined in GetApis.js*/ | 374 | /* getStudentCourses - to get courseData - defined in GetApis.js*/ |
375 | if (this.$store.state.role === "PARENT") { | 375 | if (this.$store.state.role === "PARENT") { |
376 | await this.getStudentCourses({ | 376 | await this.getStudentCourses({ |
377 | classId: localStorage.getItem("parentClassId"), | 377 | classId: localStorage.getItem("parentClassId"), |
378 | studentId: localStorage.getItem("parentStudentId"), | 378 | studentId: localStorage.getItem("parentStudentId"), |
379 | }); | 379 | }); |
380 | } | 380 | } |
381 | }, | 381 | }, |
382 | }; | 382 | }; |
383 | </script> | 383 | </script> |
384 | <style scoped> | 384 | <style scoped> |
385 | .side-bar-color { | 385 | .side-bar-color { |
386 | color: #827bfa !important; | 386 | color: #827bfa !important; |
387 | /* border-top-right-radius: 74px !important; */ | 387 | /* border-top-right-radius: 74px !important; */ |
388 | } | 388 | } |
389 | .card-border { | 389 | .card-border { |
390 | border: 1px #bdbdbd solid; | 390 | border: 1px #bdbdbd solid; |
391 | border-radius: 3px; | 391 | border-radius: 3px; |
392 | } | 392 | } |
393 | .reply-desc { | 393 | .reply-desc { |
394 | border: 1px solid #f2f2f2; | 394 | border: 1px solid #f2f2f2; |
395 | } | 395 | } |
396 | .open-dialog-button { | 396 | .open-dialog-button { |
397 | background: #827bfa !important; | 397 | background: #827bfa !important; |
398 | border-color: #827bfa !important; | 398 | border-color: #827bfa !important; |
399 | text-transform: none !important; | 399 | text-transform: none !important; |
400 | } | 400 | } |
401 | 401 | ||
402 | .reply-btn { | 402 | .reply-btn { |
403 | background: #feb83c !important; | 403 | background: #feb83c !important; |
404 | border-color: #feb83c !important; | 404 | border-color: #feb83c !important; |
405 | text-transform: none !important; | 405 | text-transform: none !important; |
406 | -webkit-box-shadow: none !important; | 406 | -webkit-box-shadow: none !important; |
407 | box-shadow: none !important; | 407 | box-shadow: none !important; |
408 | } | 408 | } |
409 | #jitsi-container { | 409 | #jitsi-container { |
410 | height: 100vh; | 410 | height: 100vh; |
411 | } | 411 | } |
412 | </style> | 412 | </style> |