-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
whiteboard support #1480
whiteboard support #1480
Conversation
demo: https://meet.tugrul.dev/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for getting this started!
jitsi/web docker image must be rebuild |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments!
@@ -214,3 +214,8 @@ JIBRI_XMPP_PASSWORD= | |||
|
|||
# Jitsi image version (useful for local development) | |||
#JITSI_IMAGE_VERSION=latest | |||
|
|||
# whiteboard support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please drop these from here and make a PR to the handbook.
web/rootfs/defaults/meet.conf
Outdated
@@ -5,6 +5,7 @@ | |||
{{ $ENABLE_SUBDOMAINS := .Env.ENABLE_SUBDOMAINS | default "true" | toBool -}} | |||
{{ $XMPP_DOMAIN := .Env.XMPP_DOMAIN | default "meet.jitsi" -}} | |||
{{ $XMPP_BOSH_URL_BASE := .Env.XMPP_BOSH_URL_BASE | default "http://xmpp.meet.jitsi:5280" -}} | |||
{{ $WHITEBOARD_URL_BASE := .Env.WHITEBOARD_URL_BASE | default "http://whiteboard.meet.jitsi" -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't set a default, otherwise it will always be enabled.
At any rate you are not using this variable.
@@ -130,6 +131,20 @@ location ^~ /etherpad/ { | |||
} | |||
{{ end }} | |||
|
|||
{{ if .Env.WHITEBOARD_URL_BASE }} | |||
# whiteboard (excalidraw-backend) | |||
location = /socket.io/ { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add some extra path here like excalidraw-collab/socket.io sinilar to what we do for Etherpad.
config.whiteboard.collabServerBaseUrl = '{{ $WHITEBOARD_COLLAB_SERVER_PUBLIC_URL }}'; | ||
{{ else if .Env.WHITEBOARD_URL_BASE -}} | ||
config.whiteboard.collabServerBaseUrl = '{{ $PUBLIC_URL }}'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adjust the URL as mentioned above.
networks: | ||
meet.jitsi: | ||
aliases: | ||
- ${WHITEBOARD_URL_BASE:-whiteboard.meet.jitsi} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just "hardcode" the alias, like we do for Etherpad.
There is not much of a point in changing it since it's just the internal network alias.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still ongoing? Or is this now supported natively already?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still ongoing
Yes, we need to publish that image indeed. I plan to do that and come back to this PR soon. |
Thanks. I am currently running the following patch locally and it seems to work without issues ( diff --git a/web/rootfs/defaults/meet.conf b/web/rootfs/defaults/meet.conf
index 6ec7c03..986e9da 100644
--- a/web/rootfs/defaults/meet.conf
+++ b/web/rootfs/defaults/meet.conf
@@ -8,6 +8,7 @@
{{ $ENABLE_SUBDOMAINS := .Env.ENABLE_SUBDOMAINS | default "true" | toBool -}}
{{ $XMPP_DOMAIN := .Env.XMPP_DOMAIN | default "meet.jitsi" -}}
{{ $XMPP_BOSH_URL_BASE := .Env.XMPP_BOSH_URL_BASE | default "http://xmpp.meet.jitsi:5280" -}}
+{{ $WHITEBOARD_ENABLED := .Env.WHITEBOARD_ENABLED | default "0" | toBool }}
server_name _;
@@ -133,6 +134,20 @@ location ^~ /etherpad/ {
}
{{ end }}
+{{ if $WHITEBOARD_ENABLED }}
+# whiteboard (excalidraw-backend)
+location = /socket.io/ {
+ tcp_nodelay on;
+
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection "upgrade";
+ proxy_set_header Host $http_host;
+
+ proxy_pass http://whiteboard.meet.jitsi/socket.io/?$args;
+}
+{{ end }}
+
location ~ ^/([^/?&:'"]+)$ {
try_files $uri @root_path;
}
diff --git a/web/rootfs/defaults/settings-config.js b/web/rootfs/defaults/settings-config.js
index 4a5fbb1..9fae33a 100644
--- a/web/rootfs/defaults/settings-config.js
+++ b/web/rootfs/defaults/settings-config.js
@@ -554,7 +554,11 @@ config.e2eping.maxMessagePerSecond = {{ .Env.E2EPING_MAX_MESSAGE_PER_SECOND }};
// Settings for the Excalidraw whiteboard integration.
config.whiteboard = {
enabled: {{ $WHITEBOARD_ENABLED }},
- collabServerBaseUrl: '{{ $WHITEBOARD_COLLAB_SERVER_PUBLIC_URL }}'
+{{ if .Env.WHITEBOARD_COLLAB_SERVER_PUBLIC_URL -}}
+ config.whiteboard.collabServerBaseUrl = '{{ $WHITEBOARD_COLLAB_SERVER_PUBLIC_URL }}';
+{{ else }}
+ collabServerBaseUrl: '{{ $PUBLIC_URL }}'
+{{ end }}
};
// Testing
diff --git a/whiteboard.yml b/whiteboard.yml
new file mode 100644
index 0000000..d7817ae
--- /dev/null
+++ b/whiteboard.yml
@@ -0,0 +1,12 @@
+version: '3.5'
+
+services:
+ whiteboard:
+ image: jitsi/excalidraw-backend:${JITSI_IMAGE_VERSION:-unstable}
+ restart: ${RESTART_POLICY:-unless-stopped}
+ depends_on:
+ - web
+ networks:
+ meet.jitsi:
+ aliases:
+ - whiteboard.meet.jitsi However as soon as i move the excalidraw location to a different path as requested in the code review things start to break: diff --git a/web/rootfs/defaults/meet.conf b/web/rootfs/defaults/meet.conf
index 986e9da..6ade033 100644
--- a/web/rootfs/defaults/meet.conf
+++ b/web/rootfs/defaults/meet.conf
@@ -136,7 +136,7 @@ location ^~ /etherpad/ {
{{ if $WHITEBOARD_ENABLED }}
# whiteboard (excalidraw-backend)
-location = /socket.io/ {
+location = /excalidraw-collab/socket.io/ {
tcp_nodelay on;
proxy_http_version 1.1;
diff --git a/web/rootfs/defaults/settings-config.js b/web/rootfs/defaults/settings-config.js
index 9fae33a..a828a2d 100644
--- a/web/rootfs/defaults/settings-config.js
+++ b/web/rootfs/defaults/settings-config.js
@@ -557,7 +557,7 @@ config.whiteboard = {
{{ if .Env.WHITEBOARD_COLLAB_SERVER_PUBLIC_URL -}}
config.whiteboard.collabServerBaseUrl = '{{ $WHITEBOARD_COLLAB_SERVER_PUBLIC_URL }}';
{{ else }}
- collabServerBaseUrl: '{{ $PUBLIC_URL }}'
+ collabServerBaseUrl: '{{ $PUBLIC_URL }}/excalidraw-collab/'
{{ end }}
};
For some reason my browser keeps trying to connect to |
I'm sorry for being persistent here but how soon-ish can we expect this to move forward @saghul? I am having trouble keeping up with master while also manually applying patches for this functionality (plus #1737). Also should we open a new PR for this? From his activity history it seems @tgrld is no longer active on GitHub. |
I can't provide an ETA, sorry. Things are busy at the moment. I'd say open a new PR.
How is that one related? AFAIS my feedback has yet to be addressed. |
It is indeed not related to this one, i was just saying that since i also need that functionality i am required to apply both patches manually every time master gets updated which is kind of troublesome, so at least having this merged would really help. I will open a new PR. |
With the completion of jitsi/excalidraw-backend#5 (publishing backend to docker hub) this would be great to have completed as well. @loli10K are you still working on this? If not I may use this branch as a start and try to get something out there sooner |
Closes: jitsi#1480 Co-authored-by: Tugrul Dogan <[email protected]> Co-authored-by: Saúl Ibarra Corretgé <[email protected]>
See: #1794 |
No description provided.