diff --git a/public/js/vroom.js b/public/js/vroom.js index 5d5869b..99281c1 100644 --- a/public/js/vroom.js +++ b/public/js/vroom.js @@ -1126,7 +1126,8 @@ function initVroom(room) { // Load etherpad in its iFrame function loadEtherpadIframe(){ $('#etherpadContainer').pad({ - host: etherpad.uri, + host: etherpad.host, + baseUrl: etherpad.path, padId: etherpad.group + '$' + room, showControls: true, showLineNumbers: false, diff --git a/templates/default/join.html.ep b/templates/default/join.html.ep index 04a665a..da67691 100644 --- a/templates/default/join.html.ep +++ b/templates/default/join.html.ep @@ -439,7 +439,11 @@ setTimeout(function(){ etherpad = { enabled: <%= $etherpad %>, - uri: "<%= $config->{'etherpad.uri'} %>", + <% + my $ethuri = URI->new($config->{'etherpad.uri'}); + %> + host: "<%= $ethuri->scheme . '://' . $ethuri->authority %>", + path: "<%= $ethuri->path . '/p/' %>", group: "<%= $etherpadGroup %>" }; <% if ($video eq 'false'){ %> diff --git a/vroom.pl b/vroom.pl index 90a4683..4ce94bf 100755 --- a/vroom.pl +++ b/vroom.pl @@ -18,6 +18,7 @@ use Etherpad::API; use Session::Token; use Config::Simple; use Email::Valid; +use URI; use Data::Dumper; app->log->level('info');