Resolution always 320x240

djuka

Member
I set constraints like this:
Code:
constraints = {
        video:
            {
                width: {min:320, ideal: 640, max:1920},
                height: {min:240, ideal: 480, max:1080},
                minBitrate: 200,
                maxBitrate: 1800,
                frameRate: 20
            },
        audio: true
    }
but on any device I tried, I got recording in 320x240. Even if the communication channel is PERFECT.
What is the purpose of this range if the stream is always with the lowest resolution?
 

Max

Administrator
Staff member
Good day.
Pleaes try ro disable constraints normalization to use non-numeric (object) width and height constraints, for example:
Code:
publishStream = session.createStream({
    ...
    disableConstraintsNormalization: true,
    constraints {
        video: {
            width: {ideal: 1024},
            height: {ideal: 768}
        },
        audio: true
    }
}).on(STREAM_STATUS.PUBLISHING, function (publishStream) {
    ...
});
publishStream.publish();
 
Top