Commit edfe025fa47320a61a51df20aaffd3f8a32cb5b4

Authored by Amber Dev
1 parent 8888e892f0

added jitsi meet

... ... @@ -6,11 +6,12 @@
6 6 <meta name="viewport" content="width=device-width,initial-scale=1.0">
7 7 <!-- <link href="https://fonts.googleapis.com/css?family=Nunito,700%7CMaterial+Icons" rel="stylesheet"> -->
8 8 <!-- <link href="https://fonts.googleapis.com/css?family=Poppins:300,400,500i,800|Material+Icons&display=swap" rel="stylesheet"> -->
9   - <link href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,700,800|Material+Icons&display=swap" rel="stylesheet">
  9 + <link href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,700,800|Material+Icons&display=swap"
  10 + rel="stylesheet">
10 11 <title>School Management</title>
11 12 <link rel="shortcut icon" href="/static/logo.png" type="image/x-icon">
12 13 <meta name="description" content="School Management">
13   - <script src='https://meet.jit.si/external_api.js'></script>
  14 + <script src='https://meet.intrack.in/external_api.js'></script>
14 15 <link href="./static/css/custom.css" rel="stylesheet" />
15 16 <!-- <style>
16 17 [v-cloak] {
... ...
src/pages/Common/UploadFiles.vue
1 1 <template>
2 2 <div>
3 3 <v-text-field
4   - :label="label"
  4 + :placeholder="label"
5 5 @click="clickInputTag"
6 6 v-model="fileName"
7 7 append-icon="attach_file"
... ... @@ -66,8 +66,10 @@ export default {
66 66 this.fileToLoad = null;
67 67 this.fileName = null;
68 68 this.fileInBase64 = null;
69   - document.getElementById(this.id).type = "text";
70   - document.getElementById(this.id).type = "file";
  69 + let inputTag = document.getElementById(this.id);
  70 + inputTag.value = null;
  71 + // inputTag.type = "text";
  72 + // inputTag.type = "file";
71 73  
72 74 let fileData = {
73 75 fileName: this.fileName,
... ...
src/pages/Common/UploadPdf.vue
... ... @@ -70,16 +70,17 @@ export default {
70 70 this.fileToLoad = null;
71 71 this.fileName = null;
72 72 this.fileInBase64 = null;
73   - document.getElementById(this.id).type = "text";
74   - document.getElementById(this.id).type = "file";
  73 + let inputTag = document.getElementById(this.id);
  74 + inputTag.value = null;
  75 + // inputTag.type = "text";
  76 + // inputTag.type = "file";
75 77  
76 78 let fileData = {
77 79 fileName: this.fileName,
78 80 fileInBase64: this.fileInBase64,
79   - emptyPdf: ""
  81 + trigger: ""
80 82 };
81   - this.$emit("pdfFileSelected", fileData);
82   - // console.log("its reset - ", fileData);
  83 + this.$emit("fileSelected", fileData);
83 84 }
84 85 },
85 86 watch: {
... ...
src/pages/Course/courseDetail.vue
... ... @@ -728,7 +728,12 @@
728 728 <v-layout>
729 729 <v-flex xs12 sm12>
730 730 <v-layout class="right">
731   - <v-btn @click="clear();" round dark class="clear-button">Clear</v-btn>
  731 + <v-btn
  732 + @click="clear();"
  733 + round
  734 + dark
  735 + class="clear-button"
  736 + >Clear</v-btn>
732 737 <v-btn @click="submit" round dark :loading="loading" class="add-button">Add</v-btn>
733 738 </v-layout>
734 739 </v-flex>
... ...
src/pages/Dashboard/LiveOnlineClass.vue
... ... @@ -29,8 +29,8 @@
29 29 <div
30 30 class="title side-bar-color font-weight-bold"
31 31 >Live Online Classes - {{$route.query.chapterName}}</div>
32   - <!-- <div class="subheading grey--text lighten-1">{{startLiveSession}}</div>
33   - <div
  32 + <div class="subheading grey--text lighten-1">{{liveLink}}</div>
  33 + <!-- <div
34 34 class="subheading grey--text lighten-1"
35 35 >The session started at 1:00 there is 1 moderator</div>-->
36 36 </v-flex>
... ... @@ -38,39 +38,19 @@
38 38 <!-- JOIN OR END SESSION -->
39 39 <v-flex>
40 40 <div>
41   - <v-btn round class="open-dialog-button" dark v-if="studentBtn">{{studentBtn}}</v-btn>
  41 + <v-btn
  42 + round
  43 + class="open-dialog-button"
  44 + dark
  45 + v-if="studentBtn"
  46 + @click="startConference();"
  47 + >{{studentBtn}}</v-btn>
42 48 <span class="subheading grey--twxt lighten-1" v-else>Session hasnt started yet</span>
43 49 </div>
44 50 </v-flex>
45   -
46   - <!-- DATA TABLE -->
47   - <!-- <v-flex>
48   - <div>
49   - <span class="subheading font-weight-bold">Recording</span>
50   - </div>
51   - <v-data-table
52   - :headers="liveOnlineHeaders"
53   - :items="liveOnlineHeaders"
54   - :pagination.sync="pagination"
55   - :search="search"
56   - item-key="_id"
57   - >
58   - <template slot="items" slot-scope="props">
59   - <tr
60   - class="tr"
61   - @click="props.expanded = !props.expanded;courseDiscussionId = props.item._id;getDiscussionesThread(props.item._id)"
62   - >
63   - <td class="text-xs-center td td-row">
64   - <v-btn round class="open-dialog-button" dark>Join Session</v-btn>
65   - </td>
66   - <td class="td td-row text-xs-center">{{ }}</td>
67   - <td class="td td-row text-xs-center">{{ }}</td>
68   - <td class="td td-row text-xs-center">-</td>
69   - <td class="td td-row text-xs-center">{{ }}</td>
70   - </tr>
71   - </template>
72   - </v-data-table>
73   - </v-flex>-->
  51 + <v-flex>
  52 + <div id="jitsi-container"></div>
  53 + </v-flex>
74 54 </v-layout>
75 55 </v-flex>
76 56  
... ... @@ -99,36 +79,6 @@
99 79 >{{startLiveSession}}</v-btn>
100 80 </div>
101 81 </v-flex>
102   -
103   - <!-- DATA TABLE -->
104   - <!-- <v-flex>
105   - <div>
106   - <span class="subheading font-weight-bold">Recording</span>
107   - </div>
108   - <v-data-table
109   - :headers="liveOnlineHeaders"
110   - :items="liveOnlineHeaders"
111   - :pagination.sync="pagination"
112   - :search="search"
113   - item-key="_id"
114   - >
115   - <template slot="items" slot-scope="props">
116   - <tr
117   - class="tr"
118   - @click="props.expanded = !props.expanded;courseDiscussionId = props.item._id;getDiscussionesThread(props.item._id)"
119   - >
120   - <td class="text-xs-center td td-row">
121   - <v-btn round class="open-dialog-button" dark>Start Session</v-btn>
122   - </td>
123   - <td class="td td-row text-xs-center">{{ }}</td>
124   - <td class="td td-row text-xs-center">{{ }}</td>
125   - <td class="td td-row text-xs-center">-</td>
126   - <td class="td td-row text-xs-center">{{ }}</td>
127   - </tr>
128   - </template>
129   - </v-data-table>
130   - </v-flex>-->
131   -
132 82 <v-flex>
133 83 <div id="jitsi-container"></div>
134 84 </v-flex>
... ... @@ -200,6 +150,7 @@ export default {
200 150 liveOnlineItems: [],
201 151  
202 152 // JITSI CONTAINER
  153 + liveLink: "",
203 154 token: "",
204 155 selectStudents: {},
205 156 classRules: [v => !!v || " Class Name is required"],
... ... @@ -222,6 +173,7 @@ export default {
222 173 audioInput: "<deviceLabel>",
223 174 audioOutput: "<deviceLabel>",
224 175 videoInput: "<deviceLabel>",
  176 + prejoinPageEnabled: false,
225 177 roomName: this.room,
226 178 height: 500,
227 179 parentNode: document.getElementById("jitsi-container"),
... ... @@ -266,7 +218,7 @@ export default {
266 218 console.log("Local User Joined");
267 219  
268 220 _this.api.executeCommand("displayName", _this.username);
269   - _this.api.executeCommand("password", this.roomPassword);
  221 + _this.api.executeCommand("password", _this.roomPassword);
270 222 });
271 223 } catch (error) {
272 224 console.error("Failed to load Jitsi API", error);
... ... @@ -341,6 +293,31 @@ export default {
341 293 this.startLiveSession = "Start Session";
342 294 this.studentBtn = "";
343 295 } else {
  296 + this.liveLink = response.data.data[0].link;
  297 + this.room = response.data.data[0].roomName;
  298 + this.username = response.data.data[0].teacherId.name;
  299 + this.roomPassword = response.data.data[0].password;
  300 + // this.room = response.data.data[0].roomName;
  301 + var this_ = this;
  302 + console.log(this.room, this.roomPassword, this.username);
  303 +
  304 + // // this.username = response.data.data.LiveClasses.teacherName;
  305 + // this.roomPassword = response.data.data[0].password;
  306 + // var this_ = this;
  307 + if (this.username != "" || this.room != "") {
  308 + if (window.JitsiMeetExternalAPI) {
  309 + // var person = prompt("Please enter your name:", "Rabie");
  310 + if (this_.username != null || this_.username != "") {
  311 + this.username = this.username;
  312 + }
  313 + // var room = prompt("Please enter your room:", "Test Room");
  314 + if (this_.room != null || this_.room != "") {
  315 + this.room = this.room;
  316 + }
  317 + // this.startConference();
  318 + }
  319 + }
  320 +
344 321 if (response.data.data[0].sessionStatus == "ENDED") {
345 322 this.startLiveSession = "Start Session";
346 323 this.studentBtn = "";
... ...
src/pages/Dashboard/dashboard.vue
... ... @@ -150,7 +150,7 @@
150 150 class="text-center title grey lighten-4 error--text"
151 151 >You have no student registered with school</p>
152 152 <!-- ACCOUNT -->
153   - <!-- <v-layout v-if="role != 'PARENT'">
  153 + <v-layout v-if="role == 'SUPERADMIN'|| role == 'ADMIN'">
154 154 <v-flex xs12>
155 155 <v-card class="card mt-2 account-Card">
156 156 <h4>
... ... @@ -213,7 +213,7 @@
213 213 </v-layout>
214 214 </v-card>
215 215 </v-flex>
216   - </v-layout>-->
  216 + </v-layout>
217 217  
218 218 <v-card class="mt-2 card" v-if="role != 'PARENT'">
219 219 <!-- <full-calendar
... ...
src/pages/Meet/meet.vue
... ... @@ -66,7 +66,7 @@ export default {
66 66 startConference() {
67 67 var _this = this;
68 68 try {
69   - const domain = "meet.jit.si";
  69 + const domain = "meet.intrack.in";
70 70 const options = {
71 71 audioInput: "<deviceLabel>",
72 72 audioOutput: "<deviceLabel>",
... ...