Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sfu
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
Alain Takoudjou
sfu
Commits
907a712d
Commit
907a712d
authored
Nov 27, 2020
by
Alain Takoudjou
Committed by
Juliusz Chroboczek
Nov 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove support for disabling camera in media player.
parent
484781e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
40 deletions
+3
-40
static/sfu.html
static/sfu.html
+0
-3
static/sfu.js
static/sfu.js
+3
-37
No files found.
static/sfu.html
View file @
907a712d
...
...
@@ -211,9 +211,6 @@
<span
class=
"volume"
title=
"Volume"
>
<i
class=
"fas fa-volume-up"
data-type=
"bt-volume"
aria-hidden=
"true"
></i>
</span>
<span
class=
"camera"
title=
"Camera"
>
<i
class=
"fas fa-video"
data-type=
"bt-camera"
aria-hidden=
"true"
></i>
</span>
<span
class=
"pip"
title=
"Picture In Picture"
>
<i
class=
"fas fa-clone"
data-type=
"bt-pip"
aria-hidden=
"true"
></i>
</span>
...
...
static/sfu.js
View file @
907a712d
...
...
@@ -768,19 +768,15 @@ async function setMaxVideoThroughput(c, bps) {
/**
* @param {string} [id]
* @param {boolean} [disableVideo]
*/
async
function
addLocalMedia
(
id
,
disableVideo
)
{
async
function
addLocalMedia
(
id
)
{
if
(
!
getUserPass
())
return
;
let
settings
=
getSettings
();
let
audio
=
settings
.
audio
?
{
deviceId
:
settings
.
audio
}
:
false
;
let
video
=
disableVideo
?
false
:
settings
.
video
?
{
deviceId
:
settings
.
video
}
:
false
;
let
video
=
settings
.
video
?
{
deviceId
:
settings
.
video
}
:
false
;
if
(
video
)
{
if
(
settings
.
blackboardMode
)
{
...
...
@@ -1012,7 +1008,6 @@ function muteLocalTracks(mute) {
*/
function
setMedia
(
c
,
isUp
,
video
)
{
let
peersdiv
=
document
.
getElementById
(
'
peers
'
);
let
settings
=
getSettings
();
let
local_media
;
for
(
let
id
in
serverConnection
.
up
)
{
...
...
@@ -1080,15 +1075,8 @@ function setMedia(c, isUp, video) {
volume
.
classList
.
add
(
"
fa-volume-off
"
);
}
}
let
camera
=
controls
.
querySelector
(
"
span.camera
"
);
if
(
local_media
&&
local_media
.
kind
===
"
local
"
)
{
if
(
!
settings
.
video
)
{
if
(
camera
)
camera
.
classList
.
add
(
"
camera-off
"
);
}
if
(
local_media
&&
local_media
.
kind
===
"
local
"
)
volume
.
parentElement
.
remove
();
}
else
camera
.
remove
();
}
media
.
srcObject
=
c
.
stream
;
...
...
@@ -1134,7 +1122,6 @@ function getParentVideo(target) {
* @param {string} peerid
*/
function
registerControlEvent
(
peerid
)
{
let
settings
=
getSettings
();
let
peer
=
document
.
getElementById
(
peerid
);
//Add event listener when a video component is added to the DOM
let
volume
=
/** @type {HTMLElement} */
(
peer
.
querySelector
(
"
span.volume
"
));
...
...
@@ -1184,27 +1171,6 @@ function registerControlEvent(peerid) {
}
};
}
let
camera
=
/** @type {HTMLElement} */
(
peer
.
querySelector
(
"
span.camera
"
));
if
(
camera
)
{
camera
.
onclick
=
function
(
event
)
{
event
.
preventDefault
();
let
camera
=
/** @type {HTMLElement} */
(
event
.
target
);
let
video
=
getParentVideo
(
camera
);
let
id
=
video
.
id
.
split
(
"
-
"
)[
1
];
if
(
!
settings
.
video
)
return
;
if
(
camera
.
getAttribute
(
"
data-type
"
)
===
"
bt-camera
"
)
{
addLocalMedia
(
id
,
true
);
camera
.
setAttribute
(
"
data-type
"
,
"
bt-camera-off
"
);
camera
.
parentElement
.
classList
.
add
(
"
disabled
"
);
}
else
{
camera
.
setAttribute
(
"
data-type
"
,
"
bt-camera
"
);
camera
.
parentElement
.
classList
.
remove
(
"
disabled
"
);
addLocalMedia
(
id
);
}
};
}
}
...
...
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