Skip to content

Commit

Permalink
fix(electron): Check for unsuported gDM
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
hristoterezov committed Feb 20, 2025
1 parent c040dee commit 6e9b9c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/RTC/ScreenObtainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ const ScreenObtainer = {

logger.warn('getDisplayMedia error', JSON.stringify(constraints), JSON.stringify(errorDetails));

if (errorDetails.code === DOMException.NOT_SUPPORTED_ERR) {
if (errorDetails.errorCode === DOMException.NOT_SUPPORTED_ERR) {
// This error is thrown when an Electron client has not set a permissions handler.
errorCallback(new JitsiTrackError(JitsiTrackErrors.SCREENSHARING_NOT_SUPPORTED_ERROR));
} else if (errorDetails.errorMsg?.indexOf('denied by system') !== -1) {
Expand Down

0 comments on commit 6e9b9c0

Please sign in to comment.