1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-23 00:55:58 +01:00

Add warning about screen sharing under Safari.

This commit is contained in:
Juliusz Chroboczek 2020-10-31 22:31:14 +01:00
parent 2efb5b3cea
commit 96c3e4f830

View file

@ -818,6 +818,8 @@ async function addLocalMedia(id) {
setButtonsVisibility(); setButtonsVisibility();
} }
let safariWarningDone = false;
async function addShareMedia() { async function addShareMedia() {
if(!getUserPass()) if(!getUserPass())
return; return;
@ -835,6 +837,15 @@ async function addShareMedia() {
return; return;
} }
if(!safariWarningDone) {
let ua = navigator.userAgent.toLowerCase();
if(ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0) {
displayWarning('Screen sharing under Safari is experimental. ' +
'Please use a different browser if possible.');
}
safariWarningDone = true;
}
let c = newUpStream(); let c = newUpStream();
c.kind = 'screenshare'; c.kind = 'screenshare';
c.stream = stream; c.stream = stream;