|
|
@ -1111,12 +1111,12 @@ function initVroom(room) { |
|
|
|
function checkMoh(){ |
|
|
|
function checkMoh(){ |
|
|
|
setTimeout(function(){ |
|
|
|
setTimeout(function(){ |
|
|
|
if (countPeers() < 1){ |
|
|
|
if (countPeers() < 1){ |
|
|
|
if ($('#pauseMohButton').is(':checked')){ |
|
|
|
if ($('.btn-moh:first').hasClass('btn-danger')){ |
|
|
|
$('#mohPlayer').get(0).volume = .25; |
|
|
|
$('#mohPlayer').get(0).volume = .25; |
|
|
|
$('#mohPlayer').get(0).play(); |
|
|
|
$('#mohPlayer').get(0).play(); |
|
|
|
} |
|
|
|
} |
|
|
|
else{ |
|
|
|
else{ |
|
|
|
$('#pauseMohButton').notify(locale.WAIT_WITH_MUSIC, 'info'); |
|
|
|
$('.btn-moh>span:first').notify(locale.WAIT_WITH_MUSIC, 'info'); |
|
|
|
} |
|
|
|
} |
|
|
|
$('.aloneEl').show(200); |
|
|
|
$('.aloneEl').show(200); |
|
|
|
} |
|
|
|
} |
|
|
@ -1840,15 +1840,14 @@ function initVroom(room) { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// Suspend/Play MoH
|
|
|
|
// Suspend/Play MoH
|
|
|
|
$('#pauseMohButton').change(function(){ |
|
|
|
$('.btn-moh').click(function(){ |
|
|
|
if ($(this).is(":checked")){ |
|
|
|
if ($(this).hasClass('btn-danger')){ |
|
|
|
$('#mohPlayer')[0].play(); |
|
|
|
$('#mohPlayer')[0].pause(); |
|
|
|
$('#pauseMohLabel').addClass('btn-danger'); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
else{ |
|
|
|
else{ |
|
|
|
$('#mohPlayer')[0].pause(); |
|
|
|
$('#mohPlayer')[0].play(); |
|
|
|
$('#pauseMohLabel').removeClass('btn-danger'); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
$('.btn-moh').toggleClass('btn-danger').button('toggle'); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// Handle hangup/close window
|
|
|
|
// Handle hangup/close window
|
|
|
|