Skip to content

Add ability to change stream resolution in GUI #228

@Abysmalduck

Description

@Abysmalduck

Currently, Screego streams at the monitor's native resolution (e.g., Quad HD/1440p). On higher-resolution displays, this causes severe FPS drops (to near zero) due to excessive bandwidth/encoding demands.
Manually modifying the useRoom.ts file to enforce resolution constraints resolves the issue:

//useRoom.ts; share function
try {
            const constraints = {
                video: {
                    frameRate: loadSettings().framerate,
                    width: { ideal: 1600, max: 1600 },
                    height: { ideal: 900, max: 900 }
                },
                audio: { 
                    echoCancellation: false,
                    autoGainControl: false,
                    noiseSuppression: false,
                    googAutoGainControl: false, }
            };

            stream.current = await navigator.mediaDevices.getDisplayMedia(constraints);

            const [videoTrack] = stream.current.getVideoTracks(); //second time for firefox
            await videoTrack.applyConstraints({
                width: { ideal: 1600, max: 1600 },
                height: { ideal: 900, max: 900 },
                frameRate: loadSettings().framerate
            });
        }

That code works well in Chrome and Firefox, so maybe it's good to add configurable resolution settings in the Screego GUI to let users customize resolution of stream.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions