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
2f449615
Commit
2f449615
authored
May 08, 2021
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add UI for simulcast control.
parent
795a40ce
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
4 deletions
+42
-4
static/galene.css
static/galene.css
+6
-0
static/galene.html
static/galene.html
+9
-0
static/galene.js
static/galene.js
+27
-4
No files found.
static/galene.css
View file @
2f449615
...
@@ -771,6 +771,12 @@ h1 {
...
@@ -771,6 +771,12 @@ h1 {
margin-right
:
0.4em
;
margin-right
:
0.4em
;
}
}
#simulcastselect
{
width
:
8em
;
text-align-last
:
center
;
margin-right
:
0.4em
;
}
#requestselect
{
#requestselect
{
width
:
8em
;
width
:
8em
;
text-align-last
:
center
;
text-align-last
:
center
;
...
...
static/galene.html
View file @
2f449615
...
@@ -208,6 +208,15 @@
...
@@ -208,6 +208,15 @@
</select>
</select>
</form>
</form>
<form
id=
"simulcastform"
>
<label
for=
"simulcastselect"
class=
"sidenav-label-first"
>
Simulcast:
</label>
<select
id=
"simulcastselect"
class=
"select select-inline"
>
<option
value=
"off"
>
off
</option>
<option
value=
"auto"
selected
>
auto
</option>
<option
value=
"on"
>
on
</option>
</select>
</form>
<form
id=
"requestform"
>
<form
id=
"requestform"
>
<label
for=
"requestselect"
class=
"sidenav-label"
>
Receive:
</label>
<label
for=
"requestselect"
class=
"sidenav-label"
>
Receive:
</label>
<select
id=
"requestselect"
class=
"select select-inline"
>
<select
id=
"requestselect"
class=
"select select-inline"
>
...
...
static/galene.js
View file @
2f449615
...
@@ -78,7 +78,7 @@ function getUserPass() {
...
@@ -78,7 +78,7 @@ function getUserPass() {
* @property {boolean} [localMute]
* @property {boolean} [localMute]
* @property {string} [video]
* @property {string} [video]
* @property {string} [audio]
* @property {string} [audio]
* @property {
boolean
} [simulcast]
* @property {
string
} [simulcast]
* @property {string} [send]
* @property {string} [send]
* @property {string} [request]
* @property {string} [request]
* @property {boolean} [activityDetection]
* @property {boolean} [activityDetection]
...
@@ -229,6 +229,13 @@ function reflectSettings() {
...
@@ -229,6 +229,13 @@ function reflectSettings() {
store
=
true
;
store
=
true
;
}
}
if
(
settings
.
hasOwnProperty
(
'
simulcast
'
))
{
getSelectElement
(
'
simulcastselect
'
).
value
=
settings
.
simulcast
}
else
{
settings
.
simulcast
=
getSelectElement
(
'
simulcastselect
'
).
value
;
store
=
true
;
}
if
(
settings
.
hasOwnProperty
(
'
blackboardMode
'
))
{
if
(
settings
.
hasOwnProperty
(
'
blackboardMode
'
))
{
getInputElement
(
'
blackboardbox
'
).
checked
=
settings
.
blackboardMode
;
getInputElement
(
'
blackboardbox
'
).
checked
=
settings
.
blackboardMode
;
}
else
{
}
else
{
...
@@ -538,6 +545,17 @@ getSelectElement('sendselect').onchange = async function(e) {
...
@@ -538,6 +545,17 @@ getSelectElement('sendselect').onchange = async function(e) {
}
}
};
};
getSelectElement
(
'
simulcastselect
'
).
onchange
=
async
function
(
e
)
{
if
(
!
(
this
instanceof
HTMLSelectElement
))
throw
new
Error
(
'
Unexpected type for this
'
);
updateSettings
({
simulcast
:
this
.
value
});
let
t
=
getMaxVideoThroughput
();
for
(
let
id
in
serverConnection
.
up
)
{
let
c
=
serverConnection
.
up
[
id
];
await
setMaxVideoThroughput
(
c
,
t
);
}
};
/**
/**
* @param {string} what
* @param {string} what
* @returns {Object<string,Array<string>>}
* @returns {Object<string,Array<string>>}
...
@@ -1042,10 +1060,15 @@ const simulcastRate = 100000;
...
@@ -1042,10 +1060,15 @@ const simulcastRate = 100000;
* @returns {boolean}
* @returns {boolean}
*/
*/
function
doSimulcast
()
{
function
doSimulcast
()
{
if
(
!
getSettings
().
simulcast
)
switch
(
getSettings
().
simulcast
)
{
case
'
on
'
:
return
true
;
case
'
off
'
:
return
false
;
return
false
;
let
bps
=
getMaxVideoThroughput
();
default
:
return
bps
<=
0
||
bps
>=
2
*
simulcastRate
;
let
bps
=
getMaxVideoThroughput
();
return
bps
<=
0
||
bps
>=
2
*
simulcastRate
;
}
}
}
/**
/**
...
...
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