Browse Source

Don't hang up client side even if all pros leave the call

Vijayakrishnan 5 năm trước cách đây
mục cha
commit
f00e3fece2
1 tập tin đã thay đổi với 3 bổ sung4 xóa
  1. 3 4
      resources/views/client-dashboard.blade.php

+ 3 - 4
resources/views/client-dashboard.blade.php

@@ -182,9 +182,6 @@
                                     }
                                 });
                             }
-                            else {
-                                self.hangUp();
-                            }
                         }
 
                         if(event.stream) {
@@ -208,7 +205,7 @@
                                 type: 'info',
                                 text: 'All other participants have left the call',
                                 progressBar: false,
-                                timeout: false,
+                                timeout: 2500,
                             }).show();
                             self.startTime = 0;
                             self.started = false;
@@ -219,6 +216,8 @@
                     // self disconnected
                     self.otSession.on('sessionDisconnected', function sessionDisconnected(event) {
                         console.log('You were disconnected from the session.', event.reason);
+                        // in case of accidental disconnection
+                        self.initOpenTok();
                     });
 
                     // initialize the publisher