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

Make warning against Safari screensharing stronger.

This commit is contained in:
Juliusz Chroboczek 2022-05-19 13:24:44 +02:00
parent 7a52ffdca7
commit 3d807677a7

View file

@ -1418,6 +1418,20 @@ async function addLocalMedia(localId) {
let safariScreenshareDone = false; let safariScreenshareDone = false;
async function addShareMedia() { async function addShareMedia() {
if(!safariScreenshareDone) {
if(isSafari()) {
let ok = confirm(
'Screen sharing in Safari is very broken. ' +
'It will work at first, ' +
'but then your video will randomly freeze. ' +
'Are you sure that you wish to enable screensharing?'
);
if(!ok)
return
}
safariScreenshareDone = true;
}
/** @type {MediaStream} */ /** @type {MediaStream} */
let stream = null; let stream = null;
try { try {
@ -1433,13 +1447,6 @@ async function addShareMedia() {
return; return;
} }
if(!safariScreenshareDone) {
if(isSafari())
displayWarning('Screen sharing under Safari is experimental. ' +
'Please use a different browser if possible.');
safariScreenshareDone = true;
}
let c = newUpStream(); let c = newUpStream();
c.label = 'screenshare'; c.label = 'screenshare';
setUpStream(c, stream); setUpStream(c, stream);