1
Fork 0
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:
Juliusz Chroboczek 2020-09-23 21:46:30 +02:00
parent 2e63c0f305
commit 6a4784da44
2 changed files with 4 additions and 5 deletions

View file

@ -1013,10 +1013,6 @@ header .collapse {
border-right: none;
}
#sharebutton {
display: none;
}
.dropdown-content {
margin-top: 10px;
}

View file

@ -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);