muaz-khan / RTCMultiConnection

RTCMultiConnection is a WebRTC JavaScript library for peer-to-peer applications (screen sharing, audio/video conferencing, file sharing, media streaming etc.)
https://muazkhan.com:9001/
MIT License
2.57k stars 1.37k forks source link

Decrease lagging in sessions when screensharing #826

Open rajatlnweb opened 5 years ago

rajatlnweb commented 5 years ago

Hello @muaz-khan, I am using RTCMultiConnection library created by you. I am facing two issues in it.

1) I would like to decrease lagging sessions when screensharing.

Can you please help me with that by sharing any reference?

matiaslopezd commented 5 years ago

@rajatlnweb do you increase the frame rates? Try use a 1280×720 16:9 resolution or less and max frame rate to 30.

{
    "video": {
        "width": {
            "min": "300",
            "max": "1280"
        },
        "height": {
            "min": "200",
            "max": "720"
        },
        "frameRate": {
            "min": "30",
            "max": "30"
        }
    }
}
xanthos84 commented 4 years ago

where should I paste this information @matiaslopezd thank you

matiaslopezd commented 4 years ago

@xanthos84 In getMediaDisplay constraints:

const constraints = {
    "video": {
        "width": {
            "min": "300",
            "max": "1280"
        },
        "height": {
            "min": "200",
            "max": "720"
        },
        "frameRate": {
            "min": "30",
            "max": "30"
        }
    }
};
const stream = await navigator.mediaDevices.getMediaDisplay(constraints);