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
96a46c69
Commit
96a46c69
authored
Feb 21, 2022
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add presenting files to context menu.
parent
296fe622
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
static/galene.js
static/galene.js
+16
-7
No files found.
static/galene.js
View file @
96a46c69
...
...
@@ -2037,6 +2037,8 @@ function userMenu(elt) {
'
setdata
'
,
serverConnection
.
id
,
{
'
raisehand
'
:
true
},
);
}});
if
(
serverConnection
.
permissions
.
indexOf
(
'
present
'
)
>=
0
&&
canFile
())
items
.
push
({
label
:
'
Broadcast file
'
,
onClick
:
presentFile
});
items
.
push
({
label
:
'
Restart media
'
,
onClick
:
renegotiateStreams
});
}
else
{
items
.
push
({
label
:
'
Send file
'
,
onClick
:
()
=>
{
...
...
@@ -3404,6 +3406,16 @@ commands.unraise = {
}
}
/** @returns {boolean} */
function
canFile
()
{
let
v
=
/** @ts-ignore */
!!
HTMLVideoElement
.
prototype
.
captureStream
||
/** @ts-ignore */
!!
HTMLVideoElement
.
prototype
.
mozCaptureStream
;
return
v
;
}
function
presentFile
()
{
let
input
=
document
.
createElement
(
'
input
'
);
input
.
type
=
'
file
'
;
...
...
@@ -3428,16 +3440,13 @@ commands.presentfile = {
presentFile
();
},
predicate
:
()
=>
{
if
(
!
canFile
())
return
'
Your browser does not support presenting arbitrary files
'
;
if
(
!
serverConnection
||
!
serverConnection
.
permissions
||
serverConnection
.
permissions
.
indexOf
(
'
present
'
)
<
0
)
return
'
You are not authorised to present
'
;
/** @ts-ignore */
if
(
!
HTMLVideoElement
.
prototype
.
captureStream
&&
/** @ts-ignore */
!
HTMLVideoElement
.
prototype
.
mozCaptureStream
)
return
'
Your browser does not support presenting arbitrary files
'
;
return
'
You are not authorised to present.
'
;
return
null
;
}
,
}
};
...
...
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