Vijayakrishnan 4 gadi atpakaļ
vecāks
revīzija
4cbb20d71e
1 mainītis faili ar 12 papildinājumiem un 8 dzēšanām
  1. 12 8
      resources/views/app/video/call-agora-v2.blade.php

+ 12 - 8
resources/views/app/video/call-agora-v2.blade.php

@@ -345,9 +345,9 @@
                                         return _participant.uid === eventData.performer;
                                     });
                                     if(!existing.length) this.otherParticipants.push(eventData.data);
-                                    Vue.nextTick(() => {
-                                        this.refreshVideos();
-                                    });
+                                    // Vue.nextTick(() => {
+                                    //     this.refreshVideos();
+                                    // });
                                 }
                             }
                         });
@@ -429,9 +429,9 @@
                                          return _participant.uid !== eventData.performer;
                                     });
 
-                                    Vue.nextTick(() => {
-                                        this.refreshVideos();
-                                    });
+                                    // Vue.nextTick(() => {
+                                    //     this.refreshVideos();
+                                    // });
                                 }
                             }
                         });
@@ -560,10 +560,14 @@
                         if(participant && participant.length) {
                             participant = participant[0];
                             if($('[data-uid="' + participant.mediaServiceIdentifier + '"]').length) {
-                                if(mediaType === 'audio' && participant.media.isMicrophoneOn) {
+                                if(mediaType === 'audio' && participant.hasAudio && participant.audioTrack) {
+                                    participant.media.isMicrophoneAcquired = true;
+                                    participant.media.isMicrophoneOn = true;
                                     user.audioTrack.play();
                                 }
-                                else if(mediaType === 'video' && participant.media.isCameraOn) {
+                                else if(mediaType === 'video' && participant.hasVideo && participant.videoTrack) {
+                                    participant.media.isCameraAcquired = true;
+                                    participant.media.isCameraOn = true;
                                     user.videoTrack.play($('[data-uid="' + user.uid + '"]')[0], {fit: 'contain'});
                                 }
                                 this.markUserAsRendered(user);