From 3fe8b2f438c4e481390d01afbd9d5d837d0e2950 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Mon, 13 Apr 2020 16:54:07 +0200 Subject: [PATCH] Can switch from screen to webcam --- assets/js/components/calls/window.js | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/assets/js/components/calls/window.js b/assets/js/components/calls/window.js index 81101571..01d0a621 100644 --- a/assets/js/components/calls/window.js +++ b/assets/js/components/calls/window.js @@ -169,7 +169,7 @@ class CallWindow extends CustomEvents { // Sub-menu entries const menuEntries = [ - //Full screen button + // Full screen button { icon: "fa-expand", text: "Toggle fullscreen", @@ -179,6 +179,27 @@ class CallWindow extends CustomEvents { } }, + + // Share screen button + { + icon: "fa-tv", + text: "Share screen", + needVideo: true, + onclick: () => { + this.startStreaming(true, true) + } + }, + + // Share camera button + { + icon: "fa-video-camera", + text: "Share webcam", + needVideo: true, + onclick: () => { + this.startStreaming(true, false) + } + }, + ] //Add buttons