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
ce0571cb
Commit
ce0571cb
authored
May 08, 2021
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use stop video button on all streamed videos.
Delete the stop video button, it is now redundant. Panic remains.
parent
a2074140
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
45 deletions
+25
-45
static/galene.html
static/galene.html
+0
-6
static/galene.js
static/galene.js
+25
-39
No files found.
static/galene.html
View file @
ce0571cb
...
...
@@ -60,12 +60,6 @@
<label>
Share Screen
</label>
</div>
</li>
<li>
<div
id=
"stopvideobutton"
class=
"invisible nav-link nav-button nav-cancel"
>
<span><i
class=
"fas fa-window-close"
aria-hidden=
"true"
></i></span>
<label>
Stop Video
</label>
</div>
</li>
<li>
<div
class=
"nav-button nav-link nav-more"
id=
"openside"
>
<span><i
class=
"fas fa-ellipsis-v"
aria-hidden=
"true"
></i></span>
...
...
static/galene.js
View file @
ce0571cb
...
...
@@ -414,7 +414,6 @@ function setButtonsVisibility() {
let
connected
=
serverConnection
&&
serverConnection
.
socket
;
let
permissions
=
serverConnection
.
permissions
;
let
local
=
!!
findUpMedia
(
'
camera
'
);
let
video
=
!!
findUpMedia
(
'
video
'
);
let
canWebrtc
=
!
(
typeof
RTCPeerConnection
===
'
undefined
'
);
let
canFile
=
/** @ts-ignore */
...
...
@@ -434,8 +433,6 @@ function setButtonsVisibility() {
setVisibility
(
'
sharebutton
'
,
canWebrtc
&&
permissions
.
present
&&
(
'
getDisplayMedia
'
in
navigator
.
mediaDevices
));
setVisibility
(
'
stopvideobutton
'
,
video
);
setVisibility
(
'
mediaoptions
'
,
permissions
.
present
);
setVisibility
(
'
sendform
'
,
permissions
.
present
);
setVisibility
(
'
fileform
'
,
canFile
&&
permissions
.
present
);
...
...
@@ -508,12 +505,6 @@ document.getElementById('sharebutton').onclick = function(e) {
addShareMedia
();
};
document
.
getElementById
(
'
stopvideobutton
'
).
onclick
=
function
(
e
)
{
e
.
preventDefault
();
closeUpMedia
(
'
video
'
);
resizePeers
();
};
getSelectElement
(
'
filterselect
'
).
onchange
=
async
function
(
e
)
{
if
(
!
(
this
instanceof
HTMLSelectElement
))
throw
new
Error
(
'
Unexpected type for this
'
);
...
...
@@ -1380,8 +1371,7 @@ async function setMedia(c, isUp, mirror, video) {
media
.
playsinline
=
true
;
media
.
id
=
'
media-
'
+
c
.
localId
;
div
.
appendChild
(
media
);
if
(
!
video
)
addCustomControls
(
media
,
div
,
c
);
addCustomControls
(
media
,
div
,
c
,
!!
video
);
}
if
(
mirror
)
...
...
@@ -1446,38 +1436,34 @@ function cloneHTMLElement(elt) {
* @param {HTMLElement} container
* @param {Stream} c
*/
function
addCustomControls
(
media
,
container
,
c
)
{
media
.
controls
=
false
;
let
controls
=
document
.
getElementById
(
'
controls-
'
+
c
.
localId
);
if
(
controls
)
{
console
.
warn
(
'
Attempted to add duplicate controls
'
);
return
;
}
function
addCustomControls
(
media
,
container
,
c
,
toponly
)
{
if
(
!
toponly
&&
!
document
.
getElementById
(
'
controls-
'
+
c
.
localId
))
{
media
.
controls
=
false
;
let
template
=
document
.
getElementById
(
'
videocontrols-template
'
).
firstElementChild
;
let
toptemplate
=
document
.
getElementById
(
'
topvideocontrols-template
'
).
firstElementChild
;
controls
=
cloneHTMLElement
(
template
);
controls
.
id
=
'
controls-
'
+
c
.
localId
;
let
topcontrols
=
cloneHTMLElement
(
toptemplate
);
topcontrols
.
id
=
'
topcontrols-
'
+
c
.
localId
;
let
template
=
document
.
getElementById
(
'
videocontrols-template
'
).
firstElementChild
;
let
controls
=
cloneHTMLElement
(
template
);
controls
.
id
=
'
controls-
'
+
c
.
localId
;
let
volume
=
getVideoButton
(
controls
,
'
volume
'
);
let
stopsharing
=
getVideoButton
(
topcontrols
,
'
video-stop
'
);
if
(
c
.
label
!==
"
screenshare
"
)
{
stopsharing
.
remove
();
}
if
(
c
.
label
===
'
camera
'
)
{
volume
.
remove
();
}
else
{
setVolumeButton
(
media
.
muted
,
getVideoButton
(
controls
,
"
volume-mute
"
),
getVideoButton
(
controls
,
"
volume-slider
"
));
let
volume
=
getVideoButton
(
controls
,
'
volume
'
);
if
(
c
.
label
===
'
camera
'
)
{
volume
.
remove
();
}
else
{
setVolumeButton
(
media
.
muted
,
getVideoButton
(
controls
,
"
volume-mute
"
),
getVideoButton
(
controls
,
"
volume-slider
"
));
}
container
.
appendChild
(
controls
);
}
container
.
appendChild
(
topcontrols
);
container
.
appendChild
(
controls
);
if
(
!
document
.
getElementById
(
'
topcontrols-
'
+
c
.
localId
))
{
let
toptemplate
=
document
.
getElementById
(
'
topvideocontrols-template
'
).
firstElementChild
;
let
topcontrols
=
cloneHTMLElement
(
toptemplate
);
topcontrols
.
id
=
'
topcontrols-
'
+
c
.
localId
;
container
.
appendChild
(
topcontrols
);
}
registerControlHandlers
(
media
,
container
,
c
);
}
...
...
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