select Video Formats
open fun selectVideoFormats(formatWrappers: List<out Representation>, allowedContainerMimeTypes: Array<String>, filterHdFormats: Boolean, orientationMayChange: Boolean, viewportWidth: Int, viewportHeight: Int): Array<Int>
Chooses a suitable subset from a number of video formats.
A format is filtered (i.e. not selected) if:
allowedContainerMimeTypes
is non-null and the format does not have one of the permitted mime types.filterHdFormats
is true and the format is HD.- It's determined that the video decoder isn't powerful enough to decode the format.
- There exists another format of lower resolution whose resolution exceeds the maximum size in pixels that the video can be rendered within the viewport.
Return
An array holding the indices of the selected formats.
Parameters
format Wrappers
Wrapped formats from which to select.
allowed Container Mime Types
An array of allowed container mime types. Null allows all mime types.
filter Hd Formats
True to filter HD formats. False otherwise.
orientation May Change
True if the video's orientation may change with respect to the viewport during playback.
viewport Width
The width in pixels of the viewport within which the video will be displayed. If the viewport size may change, this should be set to the maximum possible width.
viewport Height
The height in pixels of the viewport within which the video will be displayed. If the viewport size may change, this should be set to the maximum possible height.
Throws
Media Codec Util. Decoder Query Exception