OpenTok.PreferredVideoCodecs

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:

newPreferredVideoCodecs(newList<PreferredVideoCodecs.Codec>{Codec.H264,Codec.VP8})

To use automatic selection:

PreferredVideoCodecs.Automatic()

If null is passed instead, the SDK uses the default behavior defined by project settings.

Properties

Name Type Description
Codecs List&lt;Codec&gt; { 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.

Name Value Description
VP8 1 VP8 codec.
H264 2 H.264 codec.
VP9 3 VP9 codec.

Methods

Name Description
PreferredVideoCodecs(codecs)
(static) Automatic() → {PreferredVideoCodecs}

PreferredVideoCodecs(codecs)

Parameters:
Name Type Description
codecs List&lt;Codec&gt; A non-empty list of codecs in order of preference.

(static) Automatic() → {PreferredVideoCodecs}

Returns:

A PreferredVideoCodecs instance with automatic selection enabled.