Alert if browser is not supported

Add a modal dialog uf the browser doesn't support WebRTC or dataChannels
master
Daniel Berteaud 11 years ago
parent 39001cbd84
commit 20734ca705
  1. 4
      lib/Vroom/I18N/en.pm
  2. 5
      lib/Vroom/I18N/fr.pm
  3. 5
      public/js/vroom.js
  4. 36
      templates/default/join.html.ep

@ -57,6 +57,10 @@ our %Lexicon = (
"ERROR_MAIL_INVALID" => "Please enter a valid email address", "ERROR_MAIL_INVALID" => "Please enter a valid email address",
"CANT_SEND_TO_s" => "Couldn't send message to %s", "CANT_SEND_TO_s" => "Couldn't send message to %s",
"SCREEN_s" => "%s's screen", "SCREEN_s" => "%s's screen",
"BROWSER_NOT_SUPPORTED" => "Browser not supported",
"NO_WEBRTC_SUPPORT" => "Sorry, but the video conference will not workd because your web browser doesn't have the " .
"required functionnalities. We recommand you download one of the following browsers " .
"which support the latest web technologies required to use VROOM",
"HOME" => "Home", "HOME" => "Home",
"HELP" => "Help", "HELP" => "Help",
"ABOUT" => "About", "ABOUT" => "About",

@ -63,6 +63,11 @@ our %Lexicon = (
"ERROR_MAIL_INVALID" => "Veuillez saisir une adresse email valide", "ERROR_MAIL_INVALID" => "Veuillez saisir une adresse email valide",
"CANT_SEND_TO_s" => "Le message n'a pas pu être envoyé à %s", "CANT_SEND_TO_s" => "Le message n'a pas pu être envoyé à %s",
"SCREEN_s" => "Écran de %s", "SCREEN_s" => "Écran de %s",
"BROWSER_NOT_SUPPORTED" => "Navigateur non supporté",
"NO_WEBRTC_SUPPORT" => "Désolé, la vidéo conférence ne fonctionnera pas car votre navigateur " .
"ne dispose pas des fonctions nécessaires. Nous recommandons de télécharger " .
"un des navigateurs suivants, qui supportent les dernières technologies nécessaires " .
"à l'utilisation de VROOM",
"HOME" => "Accueil", "HOME" => "Accueil",
"HELP" => "Aide", "HELP" => "Aide",
"ABOUT" => "À propos", "ABOUT" => "À propos",

@ -70,6 +70,11 @@ function initVroom(room) {
$("#shareScreenLabel").addClass('disabled'); $("#shareScreenLabel").addClass('disabled');
} }
// If browser doesn't support webRTC or dataChannels
if (!webrtc.capabilities.support || !webrtc.capabilities.dataChannel){
$('#noWebrtcSupport').modal('show');
}
// Escape entities // Escape entities
function stringEscape(string){ function stringEscape(string){
string = string.replace(/[\u00A0-\u99999<>\&]/gim, function(i) { string = string.replace(/[\u00A0-\u99999<>\&]/gim, function(i) {

@ -81,6 +81,42 @@
</div> </div>
</div> </div>
</div> </div>
<div class="modal fade" role="dialog" id="noWebrtcSupport" aria-labelledby="noWebrtcSupport" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="noWebrtcSupportTitle"><%=l 'BROWSER_NOT_SUPPORTED' %></h4>
</div>
<div class="modal-content modal-body">
<p><%=l 'NO_WEBRTC_SUPPORT' %></p>
<div class="row">
<div class="col-sm-4">
<a href="http://www.mozilla.org/firefox/" target="_blank">
<center>
<img src="/img/firefox.png" alt="Mozilla Firefox"/>
</center>
</a>
</div>
<div class="col-sm-4">
<a href="http://www.google.com/chrome/" target="_blank">
<center>
<img src="/img/chrome.png" alt="Google Chrome"/>
</center>
</a>
</div>
<div class="col-sm-4">
<a href="http://www.opera.com" target="_blank">
<center>
<img src="/img/opera.png" alt="Opera"/>
</center>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="frame"> <div class="frame">
<div id="chatMenu" class="nav-collapse collapse"> <div id="chatMenu" class="nav-collapse collapse">
<div id="chatHistory" class="form-control"> <div id="chatHistory" class="form-control">

Loading…
Cancel
Save