mirror of
https://github.com/jech/galene.git
synced 2024-11-10 02:35:58 +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;
|
border-right: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sharebutton {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown-content {
|
.dropdown-content {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -376,11 +376,14 @@ function setButtonsVisibility() {
|
||||||
let permissions = serverConnection.permissions;
|
let permissions = serverConnection.permissions;
|
||||||
let local = !!findUpMedia('local');
|
let local = !!findUpMedia('local');
|
||||||
let share = !!findUpMedia('screenshare')
|
let share = !!findUpMedia('screenshare')
|
||||||
|
|
||||||
// don't allow multiple presentations
|
// don't allow multiple presentations
|
||||||
setVisibility('presentbutton', permissions.present && !local);
|
setVisibility('presentbutton', permissions.present && !local);
|
||||||
setVisibility('unpresentbutton', local);
|
setVisibility('unpresentbutton', local);
|
||||||
|
|
||||||
// allow multiple shared documents
|
// allow multiple shared documents
|
||||||
setVisibility('sharebutton', permissions.present);
|
setVisibility('sharebutton', permissions.present &&
|
||||||
|
('getDisplayMedia' in navigator.mediaDevices))
|
||||||
setVisibility('unsharebutton', share);
|
setVisibility('unsharebutton', share);
|
||||||
|
|
||||||
setVisibility('mediaoptions', permissions.present);
|
setVisibility('mediaoptions', permissions.present);
|
||||||
|
|
Loading…
Reference in a new issue