java.lang.Object

com.opentok.android.PublisherKit.PreferredVideoCodecs

Enclosing class: : PublisherKit


public static final class PublisherKit.PreferredVideoCodecs extends Object

Defines codec preferences for video publishing. This class allows you to specify whether the SDK should automatically select the best codec or use an explicit ordered list of preferred codecs. If not specified, the priority video codec will be determined by the project settings.

Nested Class Summary

Nested Classes

Modifier and Type

Class

Description

static enum

PublisherKit.PreferredVideoCodecs.Codec

Supported video codecs.

Method Summary

All MethodsStatic MethodsInstance MethodsConcrete Methods

Modifier and Type

Method

Description

static PublisherKit.PreferredVideoCodecs

automatic()

Creates a codec preference where the SDK automatically selects the codec.

ArrayList<PublisherKit.PreferredVideoCodecs.Codec>

getCodecs()

Returns the ordered list of preferred codecs.

boolean

isAutomatic()

Indicates whether codec selection is automatic.

static PublisherKit.PreferredVideoCodecs

manual(ArrayList<PublisherKit.PreferredVideoCodecs.Codec> codecs)

Creates a codec preference with an explicit list of codecs.

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Details

automatic

public static PublisherKit.PreferredVideoCodecs automatic()

Creates a codec preference where the SDK automatically selects the codec.

Returns: : a new PreferredVideoCodecs instance configured for automatic selection

manual

public static PublisherKit.PreferredVideoCodecs manual(ArrayList<PublisherKit.PreferredVideoCodecs.Codec> codecs)

Creates a codec preference with an explicit list of codecs.

Parameters: : codecs - ordered list of preferred codecs; must not be null or empty

Returns: : a new PreferredVideoCodecs instance configured with the given codecs

Throws: : IllegalArgumentException - if codecs is null or empty

isAutomatic

public boolean isAutomatic()

Indicates whether codec selection is automatic.

Returns: : true if the SDK chooses the codec automatically, false if manual codecs are provided

getCodecs

public ArrayList<PublisherKit.PreferredVideoCodecs.Codec> getCodecs()

Returns the ordered list of preferred codecs.

Returns: : a list of PublisherKit.PreferredVideoCodecs.Codec values, or null if automatic