瀏覽代碼

fix(electron): Check for unsuported gDM

Wrong check for unsupported getDisplayMedia when starting screen sharing will cause the app to never fallback to getUserMedia flow. This breaks screen sharing for all old electron clients that do not support getDisplayMedia.
release-8443
Hristo Terezov 9 月之前
父節點
當前提交
6e9b9c017a
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      modules/RTC/ScreenObtainer.js

+ 1
- 1
modules/RTC/ScreenObtainer.js 查看文件

315
 
315
 
316
                 logger.warn('getDisplayMedia error', JSON.stringify(constraints), JSON.stringify(errorDetails));
316
                 logger.warn('getDisplayMedia error', JSON.stringify(constraints), JSON.stringify(errorDetails));
317
 
317
 
318
-                if (errorDetails.code === DOMException.NOT_SUPPORTED_ERR) {
318
+                if (errorDetails.errorCode === DOMException.NOT_SUPPORTED_ERR) {
319
                     // This error is thrown when an Electron client has not set a permissions handler.
319
                     // This error is thrown when an Electron client has not set a permissions handler.
320
                     errorCallback(new JitsiTrackError(JitsiTrackErrors.SCREENSHARING_NOT_SUPPORTED_ERROR));
320
                     errorCallback(new JitsiTrackError(JitsiTrackErrors.SCREENSHARING_NOT_SUPPORTED_ERROR));
321
                 } else if (errorDetails.errorMsg?.indexOf('denied by system') !== -1) {
321
                 } else if (errorDetails.errorMsg?.indexOf('denied by system') !== -1) {

Loading…
取消
儲存