Publisher Max Bitrate
This topic includes details on setting the maximum video bitrate using the Vonage Video React Native client SDK.
For an overview of the publisher maximum bitrate API, see this topic.
[Update]: This version adds API enhancements for controling the maximum bitrate that a publisher. These are added as new properties of the OTPublisher
propertiesprop:videoBitratePreset-- Set this to one of the following string values: 'default', 'bw_saver', or 'extra_bw_saver'. This property is ignored if thevideoBitratePresetproperty is set.maxVideoBitrate-- To set the maximum bitrate value (instead of a preset), set the this property to a value between 5,000 and 10,000,000 (in bits per second).
If neither property is set, the
defaultpreset is used.
Setting a preset
The properties prop of the OTPublisher component includes a videoBitratePreset property. Set this to one of the following string values to have the publisher use a preset video bitrate setting: 'default', 'bw_saver', or 'extra_bw_saver'. (See Video bitrate presets for details on these presets.)
Example:
<OTPublisher
properties={{
videoBitratePreset: 'bw_saver',
// ... other properties
}}
/>
The videoBitratePreset property is ignored if the maxVideoBitrate property (described in the next section) is set. If neither are set, the publisher uses the default preset.
Setting a raw bitrate value
If the predefined presets are not suitable, you can manually set a custom raw bitrate value.
The properties prop of the OTPublisher component includes a maxVideoBitrate property. To set the maximum bitrate value (instead of a preset), set the this property to a value between 5,000 and 10,000,000 (in bits per second).
Example:
<OTPublisher
properties={{
maxVideoBitrate: 500000,
// ... other properties
}}
/>
The maxVideoBitrate property takes precidence over the videoBitratePreset property (described in the previous section). If both are set, only the maxVideoBitrate property is used. If neither are set, the publisher uses the default preset.
See Setting raw bitrate values in the Publisher Max Bitrate overview guide for more details.