1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-12-22 23:35:46 +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;
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} */
let stream = null;
try {
@ -1433,13 +1447,6 @@ async function addShareMedia() {
return;
}
if(!safariScreenshareDone) {
if(isSafari())
displayWarning('Screen sharing under Safari is experimental. ' +
'Please use a different browser if possible.');
safariScreenshareDone = true;
}
let c = newUpStream();
c.label = 'screenshare';
setUpStream(c, stream);