Vijayakrishnan 4 жил өмнө
parent
commit
738d6e5554

+ 7 - 3
resources/views/app/video/call-agora-v2.blade.php

@@ -268,7 +268,7 @@
                                         if(!this.hasError(_data)) {
                                             this.myMediaServiceToken = _data.data;
                                             this.channel = this.inMeetingForClient.clientMediaServiceRoomIdentifier;
-                                            this.registerSocket();
+                                            this.initMediaService();
                                         }
                                     }, 'json');
                                 }
@@ -288,7 +288,11 @@
                                     sessionKey: '{{$performer->session_key}}'
                                 })
                             );
-                            this.initMediaService();
+                            window.setInterval(() => {
+                                this.socketClient.send("/app/heartbeat", {},
+                                    JSON.stringify({sessionKey: '{{ request()->cookie('sessionKey') }}'})
+                                );
+                            }, 5000);
                         });
                     },
                     initSocketListeners: function() {
@@ -765,7 +769,7 @@
                     // end: other/misc
                 },
                 mounted: function () {
-
+                    this.registerSocket();
                 }
             });
         })();