From edfe025fa47320a61a51df20aaffd3f8a32cb5b4 Mon Sep 17 00:00:00 2001 From: Amber Dev Date: Tue, 21 Jul 2020 12:39:08 +0530 Subject: [PATCH] added jitsi meet --- index.html | 5 +- src/pages/Common/UploadFiles.vue | 8 ++- src/pages/Common/UploadPdf.vue | 11 ++-- src/pages/Course/courseDetail.vue | 7 ++- src/pages/Dashboard/LiveOnlineClass.vue | 103 +++++++++++++------------------- src/pages/Dashboard/dashboard.vue | 4 +- src/pages/Meet/meet.vue | 2 +- 7 files changed, 63 insertions(+), 77 deletions(-) diff --git a/index.html b/index.html index 70affe2..ea82859 100644 --- a/index.html +++ b/index.html @@ -6,11 +6,12 @@ - + School Management - + @@ -38,39 +38,19 @@
- {{studentBtn}} + {{studentBtn}} Session hasnt started yet
- - - + +
+
@@ -99,36 +79,6 @@ >{{startLiveSession}} - - - -
@@ -200,6 +150,7 @@ export default { liveOnlineItems: [], // JITSI CONTAINER + liveLink: "", token: "", selectStudents: {}, classRules: [v => !!v || " Class Name is required"], @@ -222,6 +173,7 @@ export default { audioInput: "", audioOutput: "", videoInput: "", + prejoinPageEnabled: false, roomName: this.room, height: 500, parentNode: document.getElementById("jitsi-container"), @@ -266,7 +218,7 @@ export default { console.log("Local User Joined"); _this.api.executeCommand("displayName", _this.username); - _this.api.executeCommand("password", this.roomPassword); + _this.api.executeCommand("password", _this.roomPassword); }); } catch (error) { console.error("Failed to load Jitsi API", error); @@ -341,6 +293,31 @@ export default { this.startLiveSession = "Start Session"; this.studentBtn = ""; } else { + this.liveLink = response.data.data[0].link; + this.room = response.data.data[0].roomName; + this.username = response.data.data[0].teacherId.name; + this.roomPassword = response.data.data[0].password; + // this.room = response.data.data[0].roomName; + var this_ = this; + console.log(this.room, this.roomPassword, this.username); + + // // this.username = response.data.data.LiveClasses.teacherName; + // this.roomPassword = response.data.data[0].password; + // var this_ = this; + if (this.username != "" || this.room != "") { + if (window.JitsiMeetExternalAPI) { + // var person = prompt("Please enter your name:", "Rabie"); + if (this_.username != null || this_.username != "") { + this.username = this.username; + } + // var room = prompt("Please enter your room:", "Test Room"); + if (this_.room != null || this_.room != "") { + this.room = this.room; + } + // this.startConference(); + } + } + if (response.data.data[0].sessionStatus == "ENDED") { this.startLiveSession = "Start Session"; this.studentBtn = ""; diff --git a/src/pages/Dashboard/dashboard.vue b/src/pages/Dashboard/dashboard.vue index b3f93f2..20485e7 100644 --- a/src/pages/Dashboard/dashboard.vue +++ b/src/pages/Dashboard/dashboard.vue @@ -150,7 +150,7 @@ class="text-center title grey lighten-4 error--text" >You have no student registered with school

- +