OTVideoCodecPreference
This class allows you to specify whether the SDK should automatically select the best video codec or if you want to explicitly provide a list of preferred codecs. It is used when configuring publishers to control which codecs are prioritized during negotiation. If it's not used, the codec specified in the project settings will have priority.
Properties
automatic
Type: BOOL
Indicates whether codec selection is automatic.
- If
YES, the SDK will automatically choose the most suitable codec. - If
NO, you must provide a list of codecs incodecs.
codecs
Type: NSArray<NSNumber *> *
Ordered list of preferred codecs.
This property is only valid when automatic == NO. The array contains NSNumber values representing codec types. See OTVideoCodecType.
Methods
| Name | Description |
|---|---|
(static) automatic() → {instancetype} |
Creates a codec preference where the SDK automatically selects the codec. |
(static) manualWithCodecs:(codecs) → {instancetype} |
Creates a codec preference with an explicit list of codecs. |
(static) new() → {instancetype} |
|
init() → {instancetype} |
(static) automatic() → {instancetype}
Creates a codec preference where the SDK automatically selects the codec.
Returns:
A new instance of OTVideoCodecPreference configured for automatic codec selection.
(static) manualWithCodecs:(codecs) → {instancetype}
Creates a codec preference with an explicit list of codecs.
Parameters:
| Name | Type | Description |
|---|---|---|
codecs |
NSArray<NSNumber *> * | An ordered array of codec types (wrapped in NSNumber), indicating the preferred order of codec negotiation. See OTVideoCodecType. |
Returns:
A new instance of OTVideoCodecPreference configured with the given codec list.