Skip to content

Publishing bitrate constraints support

Since Android SDK 1.1 build 1.1.0.37 it is possible to set minimum and maximum publishing bitrate constrains using the methods setMinBitrate and setMaxBitrate of VideoConstraints class. The bitrate constraints values are set in kbps.

Example code

private void setVideoBitrate(VideoConstraints videoConstraints) {
    if (mPublishVideoMinBitrate.getText().length() > 0) {
        videoConstraints.setMinBitrate(Integer.parseInt(mPublishVideoMinBitrate.getText().toString()));
    }
    if (mPublishVideoMaxBitrate.getText().length() > 0) {
        videoConstraints.setMaxBitrate(Integer.parseInt(mPublishVideoMaxBitrate.getText().toString()));
    }
}