OpenTok.PreferredVideoCodecs
Copy
public class PreferredVideoCodecs
This class lets you specify an explicit codec priority order or opt into automatic codec selection. Use this to control which codecs are prioritized during negotiation, or let the SDK decide based on internal heuristics.
To use manual ordering:
Copy
newPreferredVideoCodecs(newList<PreferredVideoCodecs.Codec>{Codec.H264,Codec.VP8})
To use automatic selection:
Copy
PreferredVideoCodecs.Automatic()
If null is passed instead, the SDK uses the default behavior defined by project settings.
Properties
| Name | Type | Description |
|---|---|---|
Codecs |
List<Codec> | { get; } The list of codecs to prioritize (in order). |
UseAutomatic |
bool | { get; } Whether to use automatic codec selection (instead of manual ordering). |
enum Codec
Available video codec options.
Methods
| Name | Description |
|---|---|
PreferredVideoCodecs(codecs) |
|
(static) Automatic() → {PreferredVideoCodecs} |
PreferredVideoCodecs(codecs)
Parameters:
| Name | Type | Description |
|---|---|---|
codecs |
List<Codec> | A non-empty list of codecs in order of preference. |
(static) Automatic() → {PreferredVideoCodecs}
Returns:
A PreferredVideoCodecs instance with automatic selection enabled.