Commit 6a4784da authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Hide share button if getDisplayMedia doesn't exist.

parent 2e63c0f3
...@@ -1013,10 +1013,6 @@ header .collapse { ...@@ -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() { ...@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment