Publisher Max Bitrate
This topic includes details on setting the maximum video bitrate using the Vonage Video Android client SDK:
For an overview of the publisher maximum bitrate API, see this topic.
Setting and retrieving a preset
The PublisherKit .VideoBitratePreset enum includes preset values:
VideoBitratePresetDefaultVideoBitratePresetBwSaverVideoBitratePresetExtraBwSaverVideoBitratePresetCustom
See Video bitrate presets for details on these presets.
To retrieve the currently configured video bitrate preset for a given publisher, call the PublisherKit.getVideoBitratePreset() method:
To set a preset, call the PublisherKit.setVideoBitratePreset() method. This method includes one parameter: preset — a value from the VideoBitratePreset enum. Do not use VideoBitratePresetCustom.
Example:
Setting and retrieving a raw bitrate value
If the predefined presets are not suitable, you can manually set a custom raw bitrate value.
To get the maximum video bitrate currently set for a publisher, call the PublisherKit.getMaxVideoBitrate() method. This returns the currently set maximum bitrate (in bits per second). If no custom value is set, the method returns 0.
Example:
To set a custom maximum bitrate value (instead of a preset), use the PublisherKit.setMaxVideoBitrate() method. This method has one parameter: maxVideoBitrate, the desired maximum bitrate (in bits per second). The maxVideoBitrate value must be between 5,000 and 10,000,000.
Example:
See Setting raw bitrate values for more details.
Special cases
Setting the raw bitrate value to 0 removes any previously set bitrate limitation, reverting to the default behavior.
Calling the getVideoBitratePreset() method after setting a custom bitrate returns VideoBitratePresetCustom.
The PublisherKit.getMaxVideoBitrate() method returns 0 when the publisher is using a preset.