Split etherpad URI into host and baseUrl

So it works in recent FF instead of trying to speak to SignalMaster SocketIO server
master
Daniel Berteaud 10 years ago
parent 1ebe4fccc0
commit cabf32d255
  1. 3
      public/js/vroom.js
  2. 6
      templates/default/join.html.ep
  3. 1
      vroom.pl

@ -1126,7 +1126,8 @@ function initVroom(room) {
// Load etherpad in its iFrame // Load etherpad in its iFrame
function loadEtherpadIframe(){ function loadEtherpadIframe(){
$('#etherpadContainer').pad({ $('#etherpadContainer').pad({
host: etherpad.uri, host: etherpad.host,
baseUrl: etherpad.path,
padId: etherpad.group + '$' + room, padId: etherpad.group + '$' + room,
showControls: true, showControls: true,
showLineNumbers: false, showLineNumbers: false,

@ -439,7 +439,11 @@
setTimeout(function(){ setTimeout(function(){
etherpad = { etherpad = {
enabled: <%= $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 %>" group: "<%= $etherpadGroup %>"
}; };
<% if ($video eq 'false'){ %> <% if ($video eq 'false'){ %>

@ -18,6 +18,7 @@ use Etherpad::API;
use Session::Token; use Session::Token;
use Config::Simple; use Config::Simple;
use Email::Valid; use Email::Valid;
use URI;
use Data::Dumper; use Data::Dumper;
app->log->level('info'); app->log->level('info');

Loading…
Cancel
Save