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
ff110ec9
Commit
ff110ec9
authored
Nov 09, 2020
by
Alain Takoudjou
Committed by
Juliusz Chroboczek
Nov 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove button control to mute/unmute my video
parent
0bc81291
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
15 deletions
+19
-15
static/sfu.js
static/sfu.js
+19
-15
No files found.
static/sfu.js
View file @
ff110ec9
...
...
@@ -1026,8 +1026,8 @@ function setMedia(c, isUp) {
controls
=
/** @type{HTMLElement} */
(
template
.
cloneNode
(
true
));
controls
.
id
=
'
controls-
'
+
c
.
id
;
div
.
appendChild
(
controls
);
let
volume
=
controls
.
querySelector
(
"
.fa-volume-up
"
);
if
(
media
.
muted
)
{
let
volume
=
controls
.
querySelector
(
"
.fa-volume-up
"
);
if
(
volume
)
{
volume
.
classList
.
remove
(
"
fa-volume-up
"
);
volume
.
classList
.
add
(
"
fa-volume-off
"
);
...
...
@@ -1039,6 +1039,7 @@ function setMedia(c, isUp) {
if
(
camera
)
camera
.
classList
.
add
(
"
camera-off
"
);
}
volume
.
parentElement
.
remove
();
}
else
camera
.
remove
();
}
...
...
@@ -1087,20 +1088,23 @@ function registerControlEvent(peerid) {
let
settings
=
getSettings
();
let
peer
=
document
.
getElementById
(
peerid
);
//Add event listener when a video component is added to the DOM
peer
.
querySelector
(
"
span.volume
"
).
onclick
=
function
(
event
)
{
event
.
preventDefault
();
let
video
=
getParentVideo
(
event
.
target
);
if
(
event
.
target
.
className
.
indexOf
(
"
fa-volume-off
"
)
!==
-
1
)
{
event
.
target
.
classList
.
remove
(
"
fa-volume-off
"
);
event
.
target
.
classList
.
add
(
"
fa-volume-up
"
);
video
.
muted
=
false
;
}
else
{
event
.
target
.
classList
.
remove
(
"
fa-volume-up
"
);
event
.
target
.
classList
.
add
(
"
fa-volume-off
"
);
// mute video sound
video
.
muted
=
true
;
}
};
let
volume
=
/** @type {HTMLElement} */
(
peer
.
querySelector
(
"
span.volume
"
));
if
(
volume
)
{
volume
.
onclick
=
function
(
event
)
{
event
.
preventDefault
();
let
video
=
getParentVideo
(
event
.
target
);
if
(
event
.
target
.
className
.
indexOf
(
"
fa-volume-off
"
)
!==
-
1
)
{
event
.
target
.
classList
.
remove
(
"
fa-volume-off
"
);
event
.
target
.
classList
.
add
(
"
fa-volume-up
"
);
video
.
muted
=
false
;
}
else
{
event
.
target
.
classList
.
remove
(
"
fa-volume-up
"
);
event
.
target
.
classList
.
add
(
"
fa-volume-off
"
);
// mute video sound
video
.
muted
=
true
;
}
};
}
let
pip
=
/** @type {HTMLElement} */
(
peer
.
querySelector
(
"
span.pip
"
));
/** @ts-ignore */
...
...
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