Pause mic and webcam when opening the quitModal dialog

Resume in we cancel
Dont change previous state (if it was already paused, don't resume)
Fix #77
master
Daniel Berteaud 11 years ago
parent 8559b5f100
commit a9eda212e2
  1. 12
      public/js/vroom.js

@ -1958,11 +1958,23 @@ function initVroom(room) {
// Handle hangup/close window
$('#logoutButton').click(function(){
$('#quitModal').modal('show');
if (!$('#muteMicButton').is(':checked')){
muteMic();
}
if (!$('#suspendCamButton').is(':checked')){
suspendCam();
}
});
// Remove the active class on the logout button if
// the modal is closed
$('#quitModal').on('hide.bs.modal',function(){
$('#logoutButton').removeClass('active');
if (!$('#muteMicButton').is(':checked')){
unmuteMic();
}
if (!$('#suspendCamButton').is(':checked')){
resumeCam();
}
});
$('#confirmQuitButton').click(function() {
hangupCall;

Loading…
Cancel
Save