Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
galene
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
galene
Commits
2e0b1959
Commit
2e0b1959
authored
Oct 07, 2020
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix resizing when we have only 2 videos
parent
31deef47
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
static/sfu.js
static/sfu.js
+2
-2
No files found.
static/sfu.js
View file @
2e0b1959
...
...
@@ -1143,8 +1143,8 @@ function resizePeers() {
let
container
=
document
.
getElementById
(
"
video-container
"
);
// Peers div has total padding of 40px, we remove 40 on offsetHeight
// Grid has row-gap of 5px
let
margins
=
(
columns
-
1
)
*
5
+
40
;
let
rows
=
Math
.
ceil
(
count
/
columns
);
let
margins
=
(
rows
-
1
)
*
5
+
40
;
if
(
count
<=
2
&&
container
.
offsetHeight
>
container
.
offsetWidth
)
{
peers
.
style
[
'
grid-template-columns
'
]
=
"
repeat(1, 1fr)
"
;
...
...
@@ -1152,7 +1152,7 @@ function resizePeers() {
}
else
{
peers
.
style
[
'
grid-template-columns
'
]
=
`repeat(
${
columns
}
, 1fr)`
;
}
if
(
rows
===
1
)
if
(
count
===
1
)
return
;
let
max_video_height
=
(
peers
.
offsetHeight
-
margins
)
/
rows
;
let
media_list
=
peers
.
querySelectorAll
(
"
.media
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment