diff --git a/lib/Vroom/I18N/en.pm b/lib/Vroom/I18N/en.pm index 041bbc8..669df33 100644 --- a/lib/Vroom/I18N/en.pm +++ b/lib/Vroom/I18N/en.pm @@ -65,6 +65,7 @@ our %Lexicon = ( "CLICK_TO_CHAT" => "Click to access the chat", "PREVENT_TO_JOIN" => "Prevent other participants to join this room", "MUTE_MIC" => "Turn off your microphone", + "NO_SOUND_DETECTED" => "No sound detected, please check your microphone (input level might be too low)", "SUSPEND_CAM" => "Suspend your webcam, other will see a black screen instead, but can still hear you", "CONFIGURE" => "Configuration", "YOU_CAN_PASSWORD_PROTECT_JOIN" => "You can protect this room with a password", diff --git a/lib/Vroom/I18N/fr.pm b/lib/Vroom/I18N/fr.pm index 2cdf634..2266dde 100644 --- a/lib/Vroom/I18N/fr.pm +++ b/lib/Vroom/I18N/fr.pm @@ -70,6 +70,7 @@ our %Lexicon = ( "CLICK_TO_CHAT" => "Cliquez ici pour accéder au tchat", "PREVENT_TO_JOIN" => "Empêchez d'autres participants de rejoindre ce salon", "MUTE_MIC" => "Coupez votre micro", + "NO_SOUND_DETECTED" => "Aucun son n'a été détecté. Vérifiez votre micro (le volume de votre micro est peut-être trop faible)", "SUSPEND_CAM" => "Stoppez la webcam, les autres verront un écran noir à la place, " . "mais pourront toujours vous entendre", "CONFIGURE" => "Configuration", diff --git a/public/js/vroom.js b/public/js/vroom.js index 25664fe..d416e7c 100644 --- a/public/js/vroom.js +++ b/public/js/vroom.js @@ -33,7 +33,8 @@ var locale = { OWNER_PASSWORD_REMOVED_BY_s: '', CANT_SEND_TO_s: '', SCREEN_s: '', - TO_INVITE_SHARE_THIS_URL: '' + TO_INVITE_SHARE_THIS_URL: '', + NO_SOUND_DETECTED: '' }; // Localize the strings we need @@ -83,7 +84,8 @@ function initVroom(room) { }; var mainVid = false, chatHistory = {}, - chatIndex = 0; + chatIndex = 0, + maxVol = -100; $('#name_local').css('background-color', peers.local.color); @@ -354,6 +356,9 @@ function initVroom(room) { // Handle volume changes from our own mic webrtc.on('volumeChange', function (volume, treshold) { + if (volume > maxVol){ + maxVol = volume; + } if (peers.local.micMuted) { return; } @@ -950,6 +955,16 @@ function initVroom(room) { }); }, 60000); + // Check if sound is detected and warn if it hasn't + setTimeout(function (){ + if (maxVol < -40){ + $.notify(locale.NO_SOUND_DETECTED, { + className: 'error', + autoHide: false + }); + } + }, 10000); + window.onresize = function (){ $('#webRTCVideo').css('max-height', maxHeight()); $('#mainVideo>video').css('max-height', maxHeight());