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
3c98e152
Commit
3c98e152
authored
Feb 21, 2022
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Control preprocessing and high-quality audio.
parent
aa30c348
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
3 deletions
+54
-3
static/galene.html
static/galene.html
+10
-0
static/galene.js
static/galene.js
+44
-3
No files found.
static/galene.html
View file @
3c98e152
...
@@ -183,6 +183,16 @@
...
@@ -183,6 +183,16 @@
<label
for=
"blackboardbox"
>
Blackboard mode
</label>
<label
for=
"blackboardbox"
>
Blackboard mode
</label>
</form>
</form>
<form>
<input
id=
"preprocessingbox"
type=
"checkbox"
/
checked
>
<label
for=
"preprocessingbox"
>
Noise suppression
</label>
</form>
<form>
<input
id=
"hqaudiobox"
type=
"checkbox"
/>
<label
for=
"hqaudiobox"
>
High-quality audio
</label>
</form>
</fieldset>
</fieldset>
</div>
</div>
...
...
static/galene.js
View file @
3c98e152
...
@@ -45,6 +45,8 @@ let token = null;
...
@@ -45,6 +45,8 @@ let token = null;
* @property {boolean} [mirrorView]
* @property {boolean} [mirrorView]
* @property {boolean} [blackboardMode]
* @property {boolean} [blackboardMode]
* @property {string} [filter]
* @property {string} [filter]
* @property {boolean} [preprocessing]
* @property {boolean} [hqaudio]
*/
*/
/** @type{settings} */
/** @type{settings} */
...
@@ -216,6 +218,20 @@ function reflectSettings() {
...
@@ -216,6 +218,20 @@ function reflectSettings() {
store
=
true
;
store
=
true
;
}
}
if
(
settings
.
hasOwnProperty
(
'
preprocessing
'
))
{
getInputElement
(
'
preprocessingbox
'
).
checked
=
settings
.
preprocessing
;
}
else
{
settings
.
preprocessing
=
getInputElement
(
'
preprocessingbox
'
).
checked
;
store
=
true
;
}
if
(
settings
.
hasOwnProperty
(
'
hqaudio
'
))
{
getInputElement
(
'
hqaudiobox
'
).
checked
=
settings
.
hqaudio
;
}
else
{
settings
.
hqaudio
=
getInputElement
(
'
hqaudiobox
'
).
checked
;
store
=
true
;
}
if
(
store
)
if
(
store
)
storeSettings
(
settings
);
storeSettings
(
settings
);
}
}
...
@@ -479,6 +495,22 @@ getInputElement('blackboardbox').onchange = function(e) {
...
@@ -479,6 +495,22 @@ getInputElement('blackboardbox').onchange = function(e) {
replaceCameraStream
();
replaceCameraStream
();
};
};
getInputElement
(
'
preprocessingbox
'
).
onchange
=
function
(
e
)
{
e
.
preventDefault
();
if
(
!
(
this
instanceof
HTMLInputElement
))
throw
new
Error
(
'
Unexpected type for this
'
);
updateSettings
({
preprocessing
:
this
.
checked
});
replaceCameraStream
();
};
getInputElement
(
'
hqaudiobox
'
).
onchange
=
function
(
e
)
{
e
.
preventDefault
();
if
(
!
(
this
instanceof
HTMLInputElement
))
throw
new
Error
(
'
Unexpected type for this
'
);
updateSettings
({
hqaudio
:
this
.
checked
});
replaceCameraStream
();
};
document
.
getElementById
(
'
mutebutton
'
).
onclick
=
function
(
e
)
{
document
.
getElementById
(
'
mutebutton
'
).
onclick
=
function
(
e
)
{
e
.
preventDefault
();
e
.
preventDefault
();
let
localMute
=
getSettings
().
localMute
;
let
localMute
=
getSettings
().
localMute
;
...
@@ -1075,6 +1107,7 @@ function isSafari() {
...
@@ -1075,6 +1107,7 @@ function isSafari() {
const
unlimitedRate
=
1000000000
;
const
unlimitedRate
=
1000000000
;
const
simulcastRate
=
100000
;
const
simulcastRate
=
100000
;
const
hqAudioRate
=
128000
;
/**
/**
* Decide whether we want to send simulcast.
* Decide whether we want to send simulcast.
...
@@ -1137,8 +1170,8 @@ function setUpStream(c, stream) {
...
@@ -1137,8 +1170,8 @@ function setUpStream(c, stream) {
* @param {MediaStreamTrack} t
* @param {MediaStreamTrack} t
*/
*/
function
addUpTrack
(
t
)
{
function
addUpTrack
(
t
)
{
if
(
c
.
label
===
'
camera
'
)
{
let
settings
=
getSettings
();
let
settings
=
getSettings
();
if
(
c
.
label
===
'
camera
'
)
{
if
(
t
.
kind
==
'
audio
'
)
{
if
(
t
.
kind
==
'
audio
'
)
{
if
(
settings
.
localMute
)
if
(
settings
.
localMute
)
t
.
enabled
=
false
;
t
.
enabled
=
false
;
...
@@ -1169,9 +1202,9 @@ function setUpStream(c, stream) {
...
@@ -1169,9 +1202,9 @@ function setUpStream(c, stream) {
maxBitrate
:
simulcastRate
,
maxBitrate
:
simulcastRate
,
});
});
}
else
{
}
else
{
if
(
c
.
label
===
'
video
'
)
{
if
(
c
.
label
!==
'
camera
'
||
settings
.
hqaudio
)
{
encodings
.
push
({
encodings
.
push
({
maxBitrate
:
192000
,
maxBitrate
:
hqAudioRate
,
});
});
}
}
}
}
...
@@ -1300,6 +1333,14 @@ async function addLocalMedia(localId) {
...
@@ -1300,6 +1333,14 @@ async function addLocalMedia(localId) {
}
}
}
}
if
(
audio
)
{
if
(
!
settings
.
preprocessing
)
{
audio
.
echoCancellation
=
false
;
audio
.
noiseSuppression
=
false
;
audio
.
autoGainControl
=
false
;
}
}
let
old
=
serverConnection
.
findByLocalId
(
localId
);
let
old
=
serverConnection
.
findByLocalId
(
localId
);
if
(
old
)
{
if
(
old
)
{
// make sure that the camera is released before we try to reopen it
// make sure that the camera is released before we try to reopen it
...
...
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