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
2d37ec98
Commit
2d37ec98
authored
Nov 27, 2020
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove support for disable video stream
Remove code to disable my video camera and keep only audio stream.
parent
21361a87
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
39 deletions
+3
-39
static/sfu.html
static/sfu.html
+0
-3
static/sfu.js
static/sfu.js
+3
-36
No files found.
static/sfu.html
View file @
2d37ec98
...
...
@@ -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 @
2d37ec98
...
...
@@ -767,19 +767,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
)
{
...
...
@@ -1011,7 +1007,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
)
{
...
...
@@ -1079,15 +1074,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
;
...
...
@@ -1183,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