|
@@ -18,6 +18,7 @@
|
|
integrity="sha512-iKDtgDyTHjAitUDdLljGhenhPwrbBfqTKWO1mkhSFH3A7blITC9MhYon6SjnMhp4o0rADGw9yAC6EW4t5a4K3g=="
|
|
integrity="sha512-iKDtgDyTHjAitUDdLljGhenhPwrbBfqTKWO1mkhSFH3A7blITC9MhYon6SjnMhp4o0rADGw9yAC6EW4t5a4K3g=="
|
|
crossorigin="anonymous"></script>
|
|
crossorigin="anonymous"></script>
|
|
<script defer src=//download.agora.io/sdk/web/AgoraRTC_N-4.1.0.js></script>
|
|
<script defer src=//download.agora.io/sdk/web/AgoraRTC_N-4.1.0.js></script>
|
|
|
|
+ <title>Scholar: Meet</title>
|
|
</head>
|
|
</head>
|
|
|
|
|
|
<body class="p-0 m-0">
|
|
<body class="p-0 m-0">
|
|
@@ -223,7 +224,6 @@
|
|
|
|
|
|
enterClientRoomAsPro: function() {
|
|
enterClientRoomAsPro: function() {
|
|
@if($client)
|
|
@if($client)
|
|
-
|
|
|
|
$.post('/api/meeting/enterClientRoomAsPro', {clientUid: '{{ $client->uid }}'}, (_data) => {
|
|
$.post('/api/meeting/enterClientRoomAsPro', {clientUid: '{{ $client->uid }}'}, (_data) => {
|
|
// TODO: check success
|
|
// TODO: check success
|
|
console.log(_data);
|
|
console.log(_data);
|
|
@@ -246,13 +246,20 @@
|
|
this.inMeetingForClient.displayName = state.inMeetingForClient.displayName;
|
|
this.inMeetingForClient.displayName = state.inMeetingForClient.displayName;
|
|
this.inMeetingForClient.dob = state.inMeetingForClient.dob;
|
|
this.inMeetingForClient.dob = state.inMeetingForClient.dob;
|
|
this.meetingType = state.meetingType;
|
|
this.meetingType = state.meetingType;
|
|
- this.myMediaServiceToken = state.myMediaServiceToken;
|
|
|
|
|
|
+ // NOTE: this now comes frm its own end-point (see below)
|
|
|
|
+ // this.myMediaServiceToken = state.myMediaServiceToken;
|
|
this.myMediaServiceIdentifier = state.myMediaServiceIdentifier;
|
|
this.myMediaServiceIdentifier = state.myMediaServiceIdentifier;
|
|
this.otherParticipants = state.otherParticipants;
|
|
this.otherParticipants = state.otherParticipants;
|
|
|
|
|
|
if(_firstRun) {
|
|
if(_firstRun) {
|
|
- this.channel = this.inMeetingForClient.clientMediaServiceRoomIdentifier;
|
|
|
|
- this.registerSocket();
|
|
|
|
|
|
+ $.post('/api/meeting/refreshMyMediaServiceToken', (_data) => { // get new agora token
|
|
|
|
+ if(!this.hasError(_data)) {
|
|
|
|
+ this.myMediaServiceToken = _data.data;
|
|
|
|
+ this.channel = this.inMeetingForClient.clientMediaServiceRoomIdentifier;
|
|
|
|
+ this.registerSocket();
|
|
|
|
+ debugger;
|
|
|
|
+ }
|
|
|
|
+ }, 'json');
|
|
}
|
|
}
|
|
|
|
|
|
console.log(this.$data);
|
|
console.log(this.$data);
|
|
@@ -579,6 +586,17 @@
|
|
},
|
|
},
|
|
// end: actions that notify participants via socket
|
|
// end: actions that notify participants via socket
|
|
|
|
|
|
|
|
+ // utils: start
|
|
|
|
+ hasError: function(_data) { // check and report error if exists via toastr
|
|
|
|
+ let msg = 'Unknown error!';
|
|
|
|
+ if(_data) {
|
|
|
|
+ if(_data.success) return false;
|
|
|
|
+ else if(_data.message) msg = _data.message;
|
|
|
|
+ }
|
|
|
|
+ toastr.error(msg);
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ // utils: end
|
|
},
|
|
},
|
|
mounted: function () {
|
|
mounted: function () {
|
|
this.enterClientRoomAsPro();
|
|
this.enterClientRoomAsPro();
|