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
b018b14c
Commit
b018b14c
authored
Apr 25, 2020
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display bitrate.
parent
38e3260e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
2 deletions
+29
-2
static/sfu.css
static/sfu.css
+4
-0
static/sfu.js
static/sfu.js
+25
-2
No files found.
static/sfu.css
View file @
b018b14c
...
@@ -171,6 +171,10 @@ h1 {
...
@@ -171,6 +171,10 @@ h1 {
margin-top
:
5px
;
margin-top
:
5px
;
}
}
.label-fallback
{
opacity
:
0.5
;
}
#inputform
{
#inputform
{
width
:
100%
;
width
:
100%
;
}
}
...
...
static/sfu.js
View file @
b018b14c
...
@@ -233,12 +233,21 @@ function delMedia(id) {
...
@@ -233,12 +233,21 @@ function delMedia(id) {
mediadiv
.
removeChild
(
peer
);
mediadiv
.
removeChild
(
peer
);
}
}
function
setLabel
(
id
)
{
function
setLabel
(
id
,
fallback
)
{
let
label
=
document
.
getElementById
(
'
label-
'
+
id
);
let
label
=
document
.
getElementById
(
'
label-
'
+
id
);
if
(
!
label
)
if
(
!
label
)
return
;
return
;
let
l
=
down
[
id
]
?
down
[
id
].
label
:
null
;
let
l
=
down
[
id
]
?
down
[
id
].
label
:
null
;
label
.
textContent
=
l
?
l
:
''
;
if
(
l
)
{
label
.
textContent
=
l
;
label
.
classList
.
remove
(
'
label-fallback
'
);
}
else
if
(
fallback
)
{
label
.
textContent
=
fallback
;
label
.
classList
.
add
(
'
label-fallback
'
);
}
else
{
label
.
textContent
=
''
;
label
.
classList
.
remove
(
'
label-fallback
'
);
}
}
}
function
serverConnect
()
{
function
serverConnect
()
{
...
@@ -429,6 +438,20 @@ async function setMaxBitrate(id, audio, video) {
...
@@ -429,6 +438,20 @@ async function setMaxBitrate(id, audio, video) {
await
s
.
setParameters
(
p
);
await
s
.
setParameters
(
p
);
}
}
}
}
if
((
audio
&&
audio
<
128000
)
||
(
video
&&
video
<
256000
))
{
let
l
=
''
;
if
(
audio
)
l
=
`
${
Math
.
round
(
audio
/
1000
)}
kbps`
if
(
video
)
{
if
(
l
)
l
=
l
+
'
+
'
;
l
=
l
+
`
${
Math
.
round
(
video
/
1000
)}
kbps`
}
setLabel
(
id
,
l
)
}
else
{
setLabel
(
id
);
}
}
}
async
function
addIceCandidates
(
conn
)
{
async
function
addIceCandidates
(
conn
)
{
...
...
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