Package com.opentok.android
Class PublisherKit.PreferredVideoCodecs
java.lang.Object
com.opentok.android.PublisherKit.PreferredVideoCodecs
- Enclosing class:
PublisherKit
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 ClassesModifier and TypeClassDescriptionstatic enumSupported video codecs. -
Method Summary
Modifier and TypeMethodDescriptionCreates a codec preference where the SDK automatically selects the codec.Returns the ordered list of preferred codecs.booleanIndicates whether codec selection is automatic.Creates a codec preference with an explicit list of codecs.
-
Method Details
-
automatic
Creates a codec preference where the SDK automatically selects the codec.- Returns:
- a new
PreferredVideoCodecsinstance 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
PreferredVideoCodecsinstance configured with the given codecs - Throws:
IllegalArgumentException- ifcodecsis null or empty
-
isAutomatic
public boolean isAutomatic()Indicates whether codec selection is automatic.- Returns:
trueif the SDK chooses the codec automatically,falseif manual codecs are provided
-
getCodecs
Returns the ordered list of preferred codecs.- Returns:
- a list of
PublisherKit.PreferredVideoCodecs.Codecvalues, ornullif automatic
-