mirror of
https://github.com/jech/galene.git
synced 2024-12-22 15:25:48 +01:00
Hide share button if getDisplayMedia doesn't exist.
This commit is contained in:
parent
2e63c0f305
commit
6a4784da44
2 changed files with 4 additions and 5 deletions
|
@ -1013,10 +1013,6 @@ header .collapse {
|
|||
border-right: none;
|
||||
}
|
||||
|
||||
#sharebutton {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.dropdown-content {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
|
|
@ -376,11 +376,14 @@ function setButtonsVisibility() {
|
|||
let permissions = serverConnection.permissions;
|
||||
let local = !!findUpMedia('local');
|
||||
let share = !!findUpMedia('screenshare')
|
||||
|
||||
// don't allow multiple presentations
|
||||
setVisibility('presentbutton', permissions.present && !local);
|
||||
setVisibility('unpresentbutton', local);
|
||||
|
||||
// allow multiple shared documents
|
||||
setVisibility('sharebutton', permissions.present);
|
||||
setVisibility('sharebutton', permissions.present &&
|
||||
('getDisplayMedia' in navigator.mediaDevices))
|
||||
setVisibility('unsharebutton', share);
|
||||
|
||||
setVisibility('mediaoptions', permissions.present);
|
||||
|
|
Loading…
Reference in a new issue