Slightly delay MoH check

So it doesn't start/stop when you join a room with participants
master
Daniel Berteaud 11 years ago
parent d4dcea1b58
commit 07276cbd86
  1. 14
      public/js/vroom.js

@ -630,13 +630,15 @@ function initVroom(room) {
// Check if MoH is needed // Check if MoH is needed
function checkMoh(){ function checkMoh(){
if (!moh && Object.keys(peers).length < 2){ setTimeout(function(){
if (!$('#pauseMohButton').is(':checked')){ if (!moh && Object.keys(peers).length < 2){
$('#mohPlayer')[0].play(); if (!$('#pauseMohButton').is(':checked')){
moh = true; $('#mohPlayer')[0].play();
moh = true;
}
$('.aloneEl').show(200);
} }
$('.aloneEl').show(200); }, 3000);
}
} }
// An owner is muting/unmuting someone // An owner is muting/unmuting someone

Loading…
Cancel
Save