Set maxBitrate and minBitrate for customStream

Boroda

New Member
I have a stream from canvas. Using canvas streaming example

Code:
function getConstraints() {
    var constraints;
    var stream = createCanvasStream();
    constraints = {
        audio: false,
        video: false,
        customStream: stream
    };
    return constraints;
}
But, i want to set maxBitrate and minBitrate settings for customStream, like this settings allowed for deviceId


Code:
publishStream = session.createStream({
    ...
    disableConstraintsNormalization: true,
    constraints {
        video: {
            width: {ideal: 1024},
            height: {ideal: 768}
            minBitrate: 800,
            maxBitrate: 2200,
        },
        audio: true
    }
}).on(STREAM_STATUS.PUBLISHING, function (publishStream) {
 

Max

Administrator
Staff member
Good day.
Video constraints does not supported for canvas stream. You can change canvas element size to desired picture resolution, bitrate can be set on server side:
Code:
webrtc_cc_min_bitrate=800000
webrtc_cc_max_bitrate=2200000
 
Top