Skip to content
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

Add support for screen sharing in 1:1 calls #5992

Merged
merged 97 commits into from
Jul 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
4a6d8eb
Add screensharing icons
SimonBrandner May 7, 2021
198722e
Add classes for screensharing buttons
SimonBrandner May 7, 2021
1f27354
Add support for up to 4 feeds
SimonBrandner May 7, 2021
5b2f941
Add button to screenshare
SimonBrandner May 7, 2021
4c9d9dd
Enable screenshare in all video calls
SimonBrandner May 8, 2021
430808a
Simplifie CSS
SimonBrandner May 8, 2021
69b0425
Improve and fix sorting
SimonBrandner May 8, 2021
2749715
Remove screensharing call type
SimonBrandner May 10, 2021
135cdb2
Add dialog with info about the screensharing change
SimonBrandner May 10, 2021
0eeb21d
Remove unnecessary import
SimonBrandner May 10, 2021
228b2cc
Increase z-index of call controls
SimonBrandner May 10, 2021
90f4ad7
Always sort feeds
SimonBrandner May 10, 2021
acd0fa4
Add a comment about when it is possible to screenshare
SimonBrandner May 10, 2021
834579f
Don't render any audio non-primary feeds
SimonBrandner May 11, 2021
adddb0f
Show screensharign button only if connected
SimonBrandner May 13, 2021
5c2abd2
Do not render the audio element if there is no audio track
SimonBrandner May 19, 2021
17fad0e
Merge remote-tracking branch 'upstream/develop' into fix/12652/screen…
SimonBrandner May 19, 2021
4cbec87
Merge remote-tracking branch 'upstream/develop' into fix/12652/screen…
SimonBrandner May 19, 2021
340bbee
Merge remote-tracking branch 'upstream/develop' into fix/12652/screen…
SimonBrandner May 20, 2021
f949526
Add a missing ;
SimonBrandner May 20, 2021
1d3bf91
Merge remote-tracking branch 'upstream/develop' into fix/12652/screen…
SimonBrandner Jun 4, 2021
6cd7608
Improve wording
SimonBrandner Jun 4, 2021
641c902
i18n
SimonBrandner Jun 4, 2021
befcbf8
Add spaces into curly braces
SimonBrandner Jun 4, 2021
6192318
Add CallViewSidebar
SimonBrandner Jun 12, 2021
5608e92
Add styling for CallViewSidebar
SimonBrandner Jun 12, 2021
97b976b
Adjust for sidebar
SimonBrandner Jun 12, 2021
1b2b471
Properly handle feed prop updates
SimonBrandner Jun 12, 2021
84070bf
Rework how feeds work
SimonBrandner Jun 12, 2021
e431f41
Fix feeds misbehaving
SimonBrandner Jun 12, 2021
176fb9b
Don't show sidebar in PiP
SimonBrandner Jun 12, 2021
0c55a6c
Add presenting text
SimonBrandner Jun 12, 2021
ed148de
Derive mute state from props
SimonBrandner Jun 12, 2021
d62f959
Fix imports
SimonBrandner Jun 12, 2021
6592839
Simplifie some naming
SimonBrandner Jun 12, 2021
e5188a5
Merge remote-tracking branch 'upstream/develop' into fix/12652/screen…
SimonBrandner Jun 12, 2021
c5ee2a6
Add share button and refoctor
SimonBrandner Jun 12, 2021
6ae1f53
Add min-width
SimonBrandner Jun 12, 2021
9a67851
Hide feeds with muted video in certain cases and fix colors
SimonBrandner Jun 12, 2021
6d29c19
Move call controls into a separate method
SimonBrandner Jun 12, 2021
10e8a1d
Allow fullscreening in all call types
SimonBrandner Jun 12, 2021
65c477f
Add sidebar icons
SimonBrandner Jun 12, 2021
60ab7aa
Support hiding sidebar
SimonBrandner Jun 12, 2021
a933e08
Also turn off camera when hiding sidebar
SimonBrandner Jun 12, 2021
cc46233
Remove emtpy line
SimonBrandner Jun 12, 2021
fc239ff
Merge remote-tracking branch 'upstream/develop' into fix/12652/screen…
SimonBrandner Jul 7, 2021
657896c
Delint
SimonBrandner Jul 7, 2021
a03b48d
Add missing null guard
SimonBrandner Jul 7, 2021
6ef7ecb
Merge remote-tracking branch 'upstream/develop' into fix/12652/screen…
SimonBrandner Jul 8, 2021
d512a83
Merge remote-tracking branch 'upstream/develop' into fix/12652/screen…
SimonBrandner Jul 16, 2021
77c8425
Rewrite using TabbedView and improve TS
SimonBrandner Jul 16, 2021
31f5d01
Improve the look and feel of the picker
SimonBrandner Jul 16, 2021
27b0261
i18n
SimonBrandner Jul 16, 2021
18ba7a2
Give sources a little padding
SimonBrandner Jul 16, 2021
2a2b8ad
Merge remote-tracking branch 'upstream/develop' into fix/12652/screen…
SimonBrandner Jul 16, 2021
66a3b0f
Merge remote-tracking branch 'upstream/develop' into fix/12652/screen…
SimonBrandner Jul 20, 2021
6491a00
Add some types
SimonBrandner Jul 20, 2021
c25feb9
Merge remote-tracking branch 'upstream/develop' into fix/12652/screen…
SimonBrandner Jul 20, 2021
fadb13e
Center all buttons
SimonBrandner Jul 20, 2021
0a282b5
Reorder buttons
SimonBrandner Jul 20, 2021
e5563ac
Update the screen-sharing buttons
SimonBrandner Jul 20, 2021
3751f04
Add "You are presenting toast"
SimonBrandner Jul 20, 2021
15406ea
Put the sidebar to the bottom rather than the top
SimonBrandner Jul 20, 2021
690905d
Show sidebar button only when screen-sharing
SimonBrandner Jul 20, 2021
0af6450
Reverse sidebar order
SimonBrandner Jul 20, 2021
c7a2849
Correct sidebar toggle behaviour
SimonBrandner Jul 20, 2021
cfaf4b8
Correct sidebar behaviour when muting local video
SimonBrandner Jul 20, 2021
4546df7
Update sidebar icons
SimonBrandner Jul 20, 2021
3993e69
Put the call controls close togather
SimonBrandner Jul 20, 2021
9fb872c
Sort feeds
SimonBrandner Jul 20, 2021
be52eba
Merge remote-tracking branch 'upstream/develop' into fix/12652/screen…
SimonBrandner Jul 21, 2021
51cf426
Update the toast
SimonBrandner Jul 21, 2021
2014517
Always show screensharing feed as primary
SimonBrandner Jul 21, 2021
74649f1
Correct feed ordering
SimonBrandner Jul 21, 2021
337664a
Update sidebar behaviour
SimonBrandner Jul 21, 2021
0a80675
Adjust hiding local feeds
SimonBrandner Jul 21, 2021
dc7f6d8
Show sidebar in PiP mode
SimonBrandner Jul 21, 2021
3fac4ad
Fix feed sizing issues
SimonBrandner Jul 21, 2021
ddd4b4b
Show a "Your camera is turned off" toast
SimonBrandner Jul 21, 2021
9891edd
Rename to toast
SimonBrandner Jul 21, 2021
d243f7b
Move some CSS to a more correct place
SimonBrandner Jul 21, 2021
c2aada6
Clearer avatar sizing
SimonBrandner Jul 21, 2021
7ad62a8
Reorganize some CSS
SimonBrandner Jul 22, 2021
1b9b5fd
Fix sidebar hiding
SimonBrandner Jul 22, 2021
37335b2
Show toast even for non-presenters
SimonBrandner Jul 22, 2021
6429b3c
Only show toast about camera in video calls
SimonBrandner Jul 22, 2021
72948b9
Keep aspect ratio for voice feeds
SimonBrandner Jul 22, 2021
8998382
Fix dumb typo
SimonBrandner Jul 22, 2021
2873bf6
Make feeds bit a smaller
SimonBrandner Jul 22, 2021
8695beb
Fix overflow issues
SimonBrandner Jul 22, 2021
33abe83
Always hide all feeds
SimonBrandner Jul 22, 2021
f4287fc
Simplifie sidebar showing logic
SimonBrandner Jul 22, 2021
2841383
rethemendex
SimonBrandner Jul 22, 2021
b762303
Merge remote-tracking branch 'upstream/develop' into fix/12652/screen…
SimonBrandner Jul 25, 2021
50c27eb
Add myself to the license header as I need to re-run the CI
SimonBrandner Jul 25, 2021
24f0c76
Merge remote-tracking branch 'upstream/develop' into fix/12652/screen…
SimonBrandner Jul 27, 2021
b9e305d
Delete mistake line
SimonBrandner Jul 27, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions res/css/_components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@
@import "./views/voip/_CallPreview.scss";
@import "./views/voip/_CallView.scss";
@import "./views/voip/_CallViewForRoom.scss";
@import "./views/voip/_CallViewSidebar.scss";
@import "./views/voip/_DialPad.scss";
@import "./views/voip/_DialPadContextMenu.scss";
@import "./views/voip/_DialPadModal.scss";
Expand Down
90 changes: 38 additions & 52 deletions res/css/views/elements/_DesktopCapturerSourcePicker.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,57 +16,43 @@ limitations under the License.

.mx_desktopCapturerSourcePicker {
overflow: hidden;
}

.mx_desktopCapturerSourcePicker_tabLabels {
display: flex;
padding: 0 0 8px 0;
}

.mx_desktopCapturerSourcePicker_tabLabel,
.mx_desktopCapturerSourcePicker_tabLabel_selected {
width: 100%;
text-align: center;
border-radius: 8px;
padding: 8px 0;
font-size: $font-13px;
}

.mx_desktopCapturerSourcePicker_tabLabel_selected {
background-color: $tab-label-active-bg-color;
color: $tab-label-active-fg-color;
}

.mx_desktopCapturerSourcePicker_panel {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: flex-start;
height: 500px;
overflow: overlay;
}

.mx_desktopCapturerSourcePicker_stream_button {
display: flex;
flex-direction: column;
margin: 8px;
border-radius: 4px;
}

.mx_desktopCapturerSourcePicker_stream_button:hover,
.mx_desktopCapturerSourcePicker_stream_button:focus {
background: $roomtile-selected-bg-color;
}

.mx_desktopCapturerSourcePicker_stream_thumbnail {
margin: 4px;
width: 312px;
}

.mx_desktopCapturerSourcePicker_stream_name {
margin: 0 4px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
width: 312px;
.mx_desktopCapturerSourcePicker_tab {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: flex-start;
height: 500px;
overflow: overlay;
}

.mx_desktopCapturerSourcePicker_source {
display: flex;
flex-direction: column;
margin: 8px;
}

.mx_desktopCapturerSourcePicker_source_thumbnail {
margin: 4px;
padding: 4px;
width: 312px;
border-width: 2px;
border-radius: 8px;
border-style: solid;
border-color: transparent;

&.mx_desktopCapturerSourcePicker_source_thumbnail_selected,
&:hover,
&:focus {
border-color: $accent-color;
}
}

.mx_desktopCapturerSourcePicker_source_name {
margin: 0 4px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
width: 312px;
}
}
79 changes: 65 additions & 14 deletions res/css/views/voip/_CallView.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,26 @@ limitations under the License.
.mx_CallView_content {
position: relative;
display: flex;
justify-content: center;
border-radius: 8px;

> .mx_VideoFeed {
width: 100%;
height: 100%;

&.mx_VideoFeed_voice {
// We don't want to collide with the call controls that have 52px of height
padding-bottom: 52px;
background-color: $inverted-bg-color;
display: flex;
justify-content: center;
align-items: center;
}

&.mx_VideoFeed_video {
background-color: #000;
}
}
}

.mx_CallView_voice {
Expand Down Expand Up @@ -290,17 +309,37 @@ limitations under the License.
width: 100%;
opacity: 1;
transition: opacity 0.5s;
z-index: 200; // To be above _all_ feeds
}

.mx_CallView_callControls_hidden {
opacity: 0.001; // opacity 0 can cause a re-layout
pointer-events: none;
}

.mx_CallView_presenting {
opacity: 1;
transition: opacity 0.5s;

position: absolute;
margin-top: 18px;
padding: 4px 8px;
border-radius: 4px;

// Same on both themes
color: white;
background-color: #17191c;
}

.mx_CallView_presenting_hidden {
opacity: 0.001; // opacity 0 can cause a re-layout
pointer-events: none;
}

.mx_CallView_callControls_button {
cursor: pointer;
margin-left: 8px;
margin-right: 8px;
margin-left: 2px;
margin-right: 2px;


&::before {
Expand All @@ -317,17 +356,11 @@ limitations under the License.
}

.mx_CallView_callControls_dialpad {
margin-right: auto;
&::before {
background-image: url('$(res)/img/voip/dialpad.svg');
}
}

.mx_CallView_callControls_button_dialpad_hidden {
margin-right: auto;
cursor: initial;
}

.mx_CallView_callControls_button_micOn {
&::before {
background-image: url('$(res)/img/voip/mic-on.svg');
Expand All @@ -352,24 +385,42 @@ limitations under the License.
}
}

.mx_CallView_callControls_button_screensharingOn {
&::before {
background-image: url('$(res)/img/voip/screensharing-on.svg');
}
}

.mx_CallView_callControls_button_screensharingOff {
&::before {
background-image: url('$(res)/img/voip/screensharing-off.svg');
}
}

.mx_CallView_callControls_button_sidebarOn {
&::before {
background-image: url('$(res)/img/voip/sidebar-on.svg');
}
}

.mx_CallView_callControls_button_sidebarOff {
&::before {
background-image: url('$(res)/img/voip/sidebar-off.svg');
}
}

.mx_CallView_callControls_button_hangup {
&::before {
background-image: url('$(res)/img/voip/hangup.svg');
}
}

.mx_CallView_callControls_button_more {
margin-left: auto;
&::before {
background-image: url('$(res)/img/voip/more.svg');
}
}

.mx_CallView_callControls_button_more_hidden {
margin-left: auto;
cursor: initial;
}

.mx_CallView_callControls_button_invisible {
visibility: hidden;
pointer-events: none;
Expand Down
52 changes: 52 additions & 0 deletions res/css/views/voip/_CallViewSidebar.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
Copyright 2021 Šimon Brandner <simon.bra.ag@gmail.com>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

.mx_CallViewSidebar {
position: absolute;
right: 16px;
bottom: 16px;
z-index: 100; // To be above the primary feed

overflow: auto;

height: calc(100% - 32px); // Subtract the top and bottom padding
width: 20%;

display: flex;
flex-direction: column-reverse;
justify-content: flex-start;
align-items: flex-end;
gap: 12px;

> .mx_VideoFeed {
width: 100%;

&.mx_VideoFeed_voice {
display: flex;
align-items: center;
justify-content: center;

aspect-ratio: 16 / 9;
}
}

&.mx_CallViewSidebar_pipMode {
top: 16px;
bottom: unset;
justify-content: flex-end;
gap: 4px;
}
}
26 changes: 4 additions & 22 deletions res/css/views/voip/_VideoFeed.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,13 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

.mx_VideoFeed_voice {
background-color: $inverted-bg-color;
}

.mx_VideoFeed {
border-radius: 4px;

.mx_VideoFeed_remote {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;

&.mx_VideoFeed_video {
background-color: #000;
&.mx_VideoFeed_voice {
background-color: $inverted-bg-color;
}
}

.mx_VideoFeed_local {
max-width: 25%;
max-height: 25%;
position: absolute;
right: 10px;
top: 10px;
z-index: 100;
border-radius: 4px;

&.mx_VideoFeed_video {
background-color: transparent;
Expand Down
18 changes: 18 additions & 0 deletions res/img/voip/screensharing-off.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions res/img/voip/screensharing-on.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions res/img/voip/sidebar-off.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading