From 5e664660dd7dd766c8a8a28085b67a1d8b12c5f7 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Fri, 30 May 2014 18:01:44 +0200 Subject: [PATCH] Support audio only fallback Fix #46 --- lib/Vroom/I18N/en.pm | 1 + lib/Vroom/I18N/fr.pm | 2 ++ public/css/vroom.css | 3 +++ public/vroom.pl | 6 ++++-- templates/default/join.html.ep | 14 +++++++++++++- 5 files changed, 23 insertions(+), 3 deletions(-) diff --git a/lib/Vroom/I18N/en.pm b/lib/Vroom/I18N/en.pm index 06b204e..cfe4ed7 100644 --- a/lib/Vroom/I18N/en.pm +++ b/lib/Vroom/I18N/en.pm @@ -182,6 +182,7 @@ our %Lexicon = ( "NO_WEBCAM" => "Cannot access your webcam", "CANT_ACCESS_WEBCAM" => "We couldn't access your webcam. Please check it's connected, powered on, and that you've ". "allowed the browser to access it, then reload this page", + "CLICK_IF_NO_WEBCAM" => "If you don't have a webcam, click the following link, you'll be able to join the room with audio only", "HOME" => "Home", "HELP" => "Help", "ABOUT" => "About", diff --git a/lib/Vroom/I18N/fr.pm b/lib/Vroom/I18N/fr.pm index de95349..3c69e09 100644 --- a/lib/Vroom/I18N/fr.pm +++ b/lib/Vroom/I18N/fr.pm @@ -195,6 +195,8 @@ our %Lexicon = ( "NO_WEBCAM" => "Impossible d'accéder à votre webcam", "CANT_ACCESS_WEBCAM" => "Nous n'avons pas pu accéder à votre webcam, vérifiez qu'elle soit bien connectée, allumée, et que ". "vous avez autorisé le navigateur à y accéder, puis raffraichissez cette page", + "CLICK_IF_NO_WEBCAM" => "Vous n'avez pas de webcam, cliquez sur le lien ci-dessous, vous pourrez rejoindre la conférence " . + "en audio uniquement", "HOME" => "Accueil", "HELP" => "Aide", "ABOUT" => "À propos", diff --git a/public/css/vroom.css b/public/css/vroom.css index 32f9970..f2e259e 100644 --- a/public/css/vroom.css +++ b/public/css/vroom.css @@ -176,6 +176,9 @@ #timeCounter { display: none; } +.bigIcon { + color: black; +} #navBarLogo { padding-top: 2px; float: left; diff --git a/public/vroom.pl b/public/vroom.pl index d20cd29..77b2a48 100755 --- a/public/vroom.pl +++ b/public/vroom.pl @@ -733,6 +733,7 @@ post '/password/(:room)' => sub { get '/(*room)' => sub { my $self = shift; my $room = $self->stash('room'); + my $video = $self->param('video') || '1'; # Redirect to lower case if ($room ne lc $room){ $self->redirect_to($self->get_url('/') . lc $room); @@ -782,8 +783,9 @@ get '/(*room)' => sub { } # Now display the room page $self->render('join', - moh => $self->choose_moh(), - turnPassword => $data->{token} + moh => $self->choose_moh(), + turnPassword => $data->{token}, + video => $video ); }; diff --git a/templates/default/join.html.ep b/templates/default/join.html.ep index 455a5b4..fd8fc75 100644 --- a/templates/default/join.html.ep +++ b/templates/default/join.html.ep @@ -223,7 +223,7 @@

<%=l 'VROOM_CHROME_EXTENSION' %>

- +

@@ -278,6 +278,14 @@

<%=l 'CANT_ACCESS_WEBCAM' %>

Webcam +
+

<%=l 'CLICK_IF_NO_WEBCAM' %>

+ +

+ + +

+
@@ -441,11 +449,15 @@ threshold: -20 }, media: { + <% if ($video eq 'false'){ %> + video: false, + <% } else{ %> video: { mandatory: { maxFrameRate: 15, } }, + <% } %> audio: true } });