Select display resolution

igallego

New Member
I'm doing a live broadcast using WebRTC.
Is it possible that the user who watches the broadcast can select the resolution to which he wants to watch the video? Or that the resolution adapts to its bandwidth?

When making the broadcast with high quality, some users can not play it correctly.

Regards
 

Max

Administrator
Staff member
Good day.
You can set playback resolution on frontend using constraints, for example:
Code:
    var options = {
        name: streamName,
        display: remoteVideo,
        constraints: {
             video: {
                  width: 640,
                  height: 360
             },
             audio: true
        }
    };
    stream = session.createStream(options).on(STREAM_STATUS.PENDING, function(stream) {
    ...
    });
    stream.play();
Note that transcoding will be enabled on server. One 720p stream published transcoding requires one CPU core, so take in account your server capability.
 
Top