User screen share with audio enabled

Hi everyone,
I would like to implement screen sharing with sound enabled.

To do this, I implemented a code using the “getDisplayMedia” method, but when I create the stream, the video quality is very low, despite having set the parameters as follows

var displayMediaOptions = { video: { cursor: ‘always’, width: { ideal: 1920, max: 1920 }, height: { ideal: 1080, max: 1080 } }, audio: true };

and also the stream doesn’t create the same size as when creating it using the no audio enabled feature.

How can I do to solve?
Thanks a lot, Matteo.

Hi everyone,
is there any updates? Can anyone advise me how to fix the problem?

Hello,

It seems a problem with WebRTC stack of browser. Have you tested with different browsers to see if the behaviour is the same?

Regards

Hi Michael,
yes, I tried with other browsers but the situation does not change.

First the sharing starts with a fairly high quality and then as the screen remains shared it gets lower and lower, until it becomes blurry.

Is there anything else I can do to force the share quality?

Greetings, Matteo.

I’m experiencing a similar issue with my screen share. Currently, the screen starts at a low resolution, specifically 360p, but it eventually reaches the ideal resolution once the shared content gets updated after some time. However, if the screen remains static with no updates, the shared content doesn’t reach the desired resolution. I was wondering if there’s a way to improve the screen share resolution right from the beginning. I’m currently using the same display media constraints as Developer3010.