Просмотр исходного кода

fix(remoteControl): Failure to start

It appears that when the gDM flow is used we do not set properly the sourceId of the shared stream.  When the user has multiple screens we use the sourceId to identify the display that is currently shared. Therefore in electron we can't identify the display that is used and we fail.
master
Hristo Terezov 7 месяцев назад
Родитель
Сommit
cec2a2e6c0
1 измененных файлов: 7 добавлений и 1 удалений
  1. 7
    1
      modules/RTC/ScreenObtainer.js

+ 7
- 1
modules/RTC/ScreenObtainer.js Просмотреть файл

@@ -312,9 +312,15 @@ const ScreenObtainer = {
312 312
                     }
313 313
                 }
314 314
 
315
+                const videoTracks = stream?.getVideoTracks();
316
+                const track = videoTracks?.length > 0 ? videoTracks[0] : undefined;
317
+                const { deviceId } = track?.getSettings() ?? {};
318
+
315 319
                 callback({
316 320
                     stream,
317
-                    sourceId: stream.id
321
+
322
+                    // Used by remote-control to identify the display that is currently shared.
323
+                    sourceId: deviceId ?? stream.id
318 324
                 });
319 325
             })
320 326
             .catch(error => {

Загрузка…
Отмена
Сохранить