C
class C
Defines constants used by the library.
Summary
Nested types |
|---|
@DocumentedCapture policies for audio attributes. |
@DocumentedContent types for audio attributes. |
@DocumentedFlags for audio attributes. |
@DocumentedUsage types for audio attributes. |
@UnstableApi |
@UnstableApiFlags which can apply to a buffer containing a media sample. |
@UnstableApiVideo color range. |
@UnstableApiVideo color spaces, also referred to as color standards. |
@UnstableApiVideo/image color transfer characteristics. |
@DocumentedRepresents a streaming or other media type. |
@DocumentedCrypto modes for a codec. |
@DocumentedTypes of crypto implementation. |
@UnstableApiRepresents a type of data. |
@DocumentedRepresents an audio encoding, or an invalid or unset value. |
@DocumentedState of the first frame in a video renderer. |
@UnstableApiLevel of support for a format. |
@UnstableApiNetwork connection type. |
@UnstableApiRepresents a PCM audio encoding, or an invalid or unset value. |
@DocumentedA value indicating the priority of a operation. |
@UnstableApiVideo projection types. |
@DocumentedTrack role flags. |
@DocumentedTrack selection flags. |
@UnstableApiRepresents a reason for selection. |
@DocumentedRepresents the behavior affecting whether spatialization will be used. |
@UnstableApiThe stereo mode for 360/3D/VR videos. |
@UnstableApiStream types for an |
@UnstableApiTexture filtering algorithm for minification. |
@DocumentedRepresents a type of media track. |
@UnstableApiStrategies for calling setFrameRate. |
@UnstableApiFlags which represent a set of video codecs. |
@UnstableApiVideo decoder output modes. |
@UnstableApiVideo scaling modes for |
@DocumentedVolume flags to be used when setting or adjusting device volume. |
@UnstableApiVolume operation type. |
@DocumentedMode specifying whether the player should hold a WakeLock and a WifiLock. |
Constants |
|
|---|---|
const Int |
See |
const Int |
|
const Int |
|
const Int |
See |
const Int |
See |
const Int |
|
const Int |
See |
const Int |
See |
const Int |
Represents an unset |
const Int |
An inverse encoded depth video track. |
const Int |
A linear encoded depth video track. |
const Int |
A timed metadata of depth video track. |
const Int |
The original video track without any depth based effects applied. |
const Int |
Not an auxiliary track or an auxiliary track with an undefined type. |
const Int |
The number of bits per byte. |
const Int |
@UnstableApiIndicates that a buffer is (at least partially) encrypted. |
const Int |
Flag for empty buffers that signal that the end of the stream was reached. |
const Int |
@UnstableApiIndicates that a buffer is known to contain the first media sample of the stream. |
const Int |
@UnstableApiIndicates that a buffer has supplemental data. |
const Int |
Indicates that a buffer holds a synchronization sample. |
const Int |
@UnstableApiIndicates that a buffer is known to contain the last media sample of the stream. |
const Int |
@UnstableApiIndicates that no other buffers depend on the data in this buffer. |
const Int |
The number of bytes per float. |
const String! |
@UnstableApi"cbc1" scheme type name as defined in ISO/IEC 23001-7:2016. |
const String! |
@UnstableApi"cbcs" scheme type name as defined in ISO/IEC 23001-7:2016. |
const String! |
@UnstableApi"cenc" scheme type name as defined in ISO/IEC 23001-7:2016. |
const String! |
@UnstableApi"cens" scheme type name as defined in ISO/IEC 23001-7:2016. |
const UUID! |
UUID for the ClearKey DRM scheme. |
const Int |
See |
const Int |
See |
const Int |
|
const Int |
|
const Int |
See |
const Int |
See |
const Int |
See |
const Int |
|
const Int |
|
const Int |
See |
const Int |
|
const UUID! |
UUID for the W3C Common PSSH box. |
const Int |
Value representing a DASH manifest. |
const Int |
CONTENT_TYPE_HLS = 2Value representing an HLS manifest. |
const Int |
This property is deprecated. Use |
const Int |
This property is deprecated. Use |
const Int |
Value representing files other than DASH, HLS or Smooth Streaming manifests, or RTSP URIs. |
const Int |
Value representing an RTSP stream. |
const Int |
This property is deprecated. Use |
const Int |
This property is deprecated. Use |
const Int |
CONTENT_TYPE_SS = 1Value representing a Smooth Streaming manifest. |
const Int |
This property is deprecated. Use |
const Int |
See |
const Int |
See |
const Int |
|
const Int |
CRYPTO_TYPE_CUSTOM_BASE = 10000Applications or extensions may define custom |
const Int |
Framework crypto in which a |
const Int |
CRYPTO_TYPE_NONE = 0No crypto. |
const Int |
An unsupported crypto type. |
const Int |
A data type constant for ads loader data. |
const Int |
@UnstableApiApplications or extensions may define custom |
const Int |
A data type constant for drm or encryption data. |
const Int |
A data type constant for a manifest file. |
const Int |
A data type constant for media, typically containing media samples. |
const Int |
A data type constant for media, typically containing only initialization data. |
const Int |
A data type constant for live progressive media streams, typically containing media samples. |
const Int |
A data type constant for time synchronization data. |
const Int |
A data type constant for data of unknown or unspecified type. |
const Int |
A default size in bytes for an individual allocation that forms part of a larger buffer. |
const Long |
A default maximum position for which a seek to previous will seek to the previous window, in milliseconds. |
const Long |
A default seek back increment, in milliseconds. |
const Long |
A default seek forward increment, in milliseconds. |
const Int |
ENCODING_AAC_ELD = 15See |
const Int |
@UnstableApiAAC Error Resilient Bit-Sliced Arithmetic Coding. |
const Int |
ENCODING_AAC_HE_V1 = 11See |
const Int |
ENCODING_AAC_HE_V2 = 12See |
const Int |
ENCODING_AAC_LC = 10See |
const Int |
ENCODING_AAC_XHE = 16See |
const Int |
ENCODING_AC3 = 5See |
const Int |
ENCODING_AC4 = 17See |
const Int |
|
const Int |
ENCODING_DTS = 7See |
const Int |
ENCODING_DTS_HD = 8See |
const Int |
ENCODING_DTS_UHD_P2 = 30See |
const Int |
ENCODING_E_AC3 = 6See |
const Int |
ENCODING_E_AC3_JOC = 18See |
const Int |
ENCODING_INVALID = 0See |
const Int |
ENCODING_MP3 = 9See |
const Int |
ENCODING_OPUS = 20See |
const Int |
See |
const Int |
@UnstableApiLike |
const Int |
ENCODING_PCM_24BIT = 21PCM encoding with 24 bits per sample. |
const Int |
@UnstableApiLike |
const Int |
ENCODING_PCM_32BIT = 22PCM encoding with 32 bits per sample. |
const Int |
@UnstableApiLike |
const Int |
See |
const Int |
See |
const Int |
The first frame was not rendered after the last reset, output surface or stream change. |
const Int |
The first frame was not rendered after the last stream change. |
const Int |
The first frame was not rendered yet, and is only allowed to be rendered if the renderer is started. |
const Int |
The first frame was rendered. |
const Int |
|
const Int |
Formats with the same MIME type are supported, but the properties of this format exceed the declared capabilities. |
const Int |
The format is supported. |
const Int |
Formats with the same MIME type are supported, but this format's DRM protection is not supported. |
const Int |
Formats with the same type of media (e.g. video, audio, image or text) are generally supported, but not this format. |
const Int |
The format is unsupported, because no formats with the same type of media (e.g. video, audio, image or text) are supported or there is only specialized support for different MIME types of the same type. |
const Int |
INDEX_UNSET = -1Represents an unset or unknown index or byte position. |
const String! |
LANGUAGE_UNDETERMINED = "und"Represents an undetermined language as an ISO 639-2 language code. |
const Int |
LENGTH_UNSET = -1Represents an unset or unknown length. |
const Int |
A non-realtime (as fast as possible) |
const Int |
A realtime |
const Long |
@UnstableApiThe number of microseconds in one second. |
const Long |
@UnstableApiThe number of milliseconds in one second. |
const Long |
@UnstableApiThe number of nanoseconds in one second. |
const Int |
Network type for a 2G cellular connection. |
const Int |
Network type for a 3G cellular connection. |
const Int |
Network type for a 4G cellular connection. |
const Int |
Network type for a 5G non-stand-alone (NSA) cellular connection. |
const Int |
Network type for a 5G stand-alone (SA) cellular connection. |
const Int |
Network type for cellular connections which cannot be mapped to one of |
const Int |
Network type for an Ethernet connection. |
const Int |
No network connection. |
const Int |
Network type for other connections which are not Wifi or cellular (e.g. VPN, Bluetooth). |
const Int |
Unknown network type. |
const Int |
Network type for a Wifi connection. |
const Int |
Represents an unset or unknown percentage. |
const UUID! |
UUID for the PlayReady DRM scheme. |
const Int |
This property is deprecated. Use |
const Int |
@UnstableApi
|
const Int |
The maximum supported |
const Int |
@UnstableApi
|
const Int |
@UnstableApi
|
const Int |
|
const Int |
|
const Int |
Cube map projection. |
const Int |
Equirectangular spherical projection. |
const Int |
3-D mesh projection. |
const Int |
Conventional rectangular projection. |
const Float |
RATE_UNSET = -3.4028235E38fRepresents an unset or unknown rate. |
const Int |
@UnstableApiRepresents an unset or unknown integer rate. |
const Int |
A return value for methods where a buffer was read. |
const Int |
A return value for methods where the end of an input was encountered. |
const Int |
A return value for methods where a format was read. |
const Int |
A return value for methods where the length of parsed data exceeds the maximum length allowed. |
const Int |
A return value for methods where nothing was read. |
const Int |
Indicates an alternate track. |
const Int |
ROLE_FLAG_AUXILIARY = 32768Indicates an auxiliary track. |
const Int |
ROLE_FLAG_CAPTION = 64Indicates the track contains captions. |
const Int |
Indicates the track contains commentary, for example from the director. |
const Int |
Indicates the track contains a textual description of music and sound. |
const Int |
Indicates the track contains an audio or textual description of a video track. |
const Int |
ROLE_FLAG_DUB = 16Indicates the track is in a different language from the original, for example dubbed audio or translated captions. |
const Int |
ROLE_FLAG_EASY_TO_READ = 8192Indicates the track contains a text that has been edited for ease of reading. |
const Int |
ROLE_FLAG_EMERGENCY = 32Indicates the track contains information about a current emergency. |
const Int |
Indicates the track is designed for improved intelligibility of dialogue. |
const Int |
ROLE_FLAG_MAIN = 1Indicates a main track. |
const Int |
ROLE_FLAG_SIGN = 256Indicates the track contains a visual sign-language interpretation of an audio track. |
const Int |
ROLE_FLAG_SUBTITLE = 128Indicates the track contains subtitles. |
const Int |
Indicates a supplementary track, meaning the track has lower importance than the main track(s). |
const Int |
ROLE_FLAG_TRANSCRIBES_DIALOG = 4096Indicates the track contains a transcription of spoken dialog. |
const Int |
ROLE_FLAG_TRICK_PLAY = 16384Indicates the track is intended for trick play. |
const String! |
@UnstableApiThe name of the sans-serif font family. |
const Int |
Indicates that the player may choose to play the track in absence of an explicit user preference. |
const Int |
Indicates that the track should be selected if user preferences do not state otherwise. |
const Int |
Indicates that the track should be selected if its language matches the language of the selected audio track and user preferences do not state otherwise. |
const Int |
A selection reason constant for an adaptive track selection. |
const Int |
Applications or extensions may define custom |
const Int |
A selection reason constant for an initial track selection. |
const Int |
A selection reason constant for an manual (i.e. user initiated) track selection. |
const Int |
A selection reason constant for a trick play track selection. |
const Int |
A selection reason constant for selections whose reasons are unknown or unspecified. |
const String! |
@UnstableApiThe name of the serif font family. |
const Int |
|
const Int |
|
const String! |
@UnstableApiThe |
const Int |
Indicates interleaved stereo layout with the left view being the primary view, used with 360/3D/VR videos. |
const Int |
Indicates interleaved stereo layout with the right view being the primary view, used with 360/3D/VR videos. |
const Int |
Indicates Left-Right stereo layout, used with 360/3D/VR videos. |
const Int |
Indicates Monoscopic stereo layout, used with 360/3D/VR videos. |
const Int |
Indicates a stereo layout where the left and right eyes have separate meshes, used with 360/3D/VR videos. |
const Int |
Indicates Top-Bottom stereo layout, used with 360/3D/VR videos. |
const Int |
See |
const Int |
See |
const Int |
The default stream type used by audio renderers. |
const Int |
See |
const Int |
See |
const Int |
See |
const Int |
See |
const Int |
See |
const Int |
See |
const Int |
Returns the weighted average of the four texture elements that are closest to the specified texture coordinates. |
const Int |
Chooses the two mipmaps that most closely match the size of the pixel being textured and uses the |
const Long |
TIME_END_OF_SOURCE = -9223372036854775808Special constant representing a time corresponding to the end of a source. |
const Long |
TIME_UNSET = -9223372036854775807Special constant representing an unset or unknown time or duration. |
const Int |
TRACK_TYPE_AUDIO = 1A type constant for audio tracks. |
const Int |
A type constant for camera motion tracks. |
const Int |
TRACK_TYPE_CUSTOM_BASE = 10000Applications or extensions may define custom |
const Int |
A type constant for tracks of some default type, where the type itself is unknown. |
const Int |
TRACK_TYPE_IMAGE = 4A type constant for image tracks. |
const Int |
A type constant for metadata tracks. |
const Int |
TRACK_TYPE_NONE = -2A type constant for a fake or empty track. |
const Int |
TRACK_TYPE_TEXT = 3A type constant for text tracks. |
const Int |
TRACK_TYPE_UNKNOWN = -1A type constant for tracks of unknown type. |
const Int |
TRACK_TYPE_VIDEO = 2A type constant for video tracks. |
const Int |
@UnstableApiThis property is deprecated. Use |
const Int |
@UnstableApiThis property is deprecated. Use |
const Int |
This property is deprecated. Use |
const Int |
@UnstableApiThis property is deprecated. Use |
const Int |
@UnstableApiThis property is deprecated. Use |
const Int |
USAGE_ALARM = 4See |
const Int |
|
const Int |
|
const Int |
|
const Int |
USAGE_ASSISTANT = 16See |
const Int |
USAGE_GAME = 14See |
const Int |
USAGE_MEDIA = 1See |
const Int |
See |
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
|
const Int |
USAGE_UNKNOWN = 0See |
const Int |
|
const Int |
|
const UUID! |
The Nil UUID as defined by RFC4122. |
const Int |
@UnstableApiStrategy to never call setFrameRate. |
const Int |
Strategy to call setFrameRate with |
const Int |
|
const Int |
|
const Int |
Video decoder output mode is not set. |
const Int |
Video decoder output mode that renders 4:2:0 YUV planes directly to a surface. |
const Int |
Video decoder output mode that outputs raw 4:2:0 YUV planes. |
const Int |
A default video scaling mode for |
const Int |
|
const Int |
|
const Int |
|
const Int |
See |
const Int |
|
const Int |
See |
const Int |
VOLUME_FLAG_VIBRATE = 16See |
const Int |
A volume operation type constant for muting. |
const Int |
A volume operation type constant for direct setting of the Player volume. |
const Int |
A volume operation type constant for unmuting. |
const Int |
WAKE_MODE_LOCAL = 1A wake mode that will cause the player to hold a |
const Int |
A wake mode that will cause the player to hold a |
const Int |
WAKE_MODE_NONE = 0A wake mode that will not cause the player to hold any locks. |
const UUID! |
UUID for the Widevine DRM scheme. |
Public functions |
|
|---|---|
java-static Int |
@UnstableApiThis function is deprecated. |
java-static Int |
@UnstableApiThis function is deprecated. |
java-static String! |
@UnstableApiThis function is deprecated. |
java-static Long |
@UnstableApiThis function is deprecated. Use |
java-static Long |
@UnstableApiThis function is deprecated. Use |
Constants
AUDIO_SESSION_ID_UNSET
@UnstableApi
const val AUDIO_SESSION_ID_UNSET = 0: Int
Represents an unset android.media.AudioTrack session identifier. Equal to AUDIO_SESSION_ID_GENERATE.
AUXILIARY_TRACK_TYPE_DEPTH_INVERSE
@UnstableApi
const val AUXILIARY_TRACK_TYPE_DEPTH_INVERSE = 3: Int
An inverse encoded depth video track.
See https://developer.android.com/static/media/camera/camera2/Dynamic-depth-v1.0.pdf for inverse depth encoding.
AUXILIARY_TRACK_TYPE_DEPTH_LINEAR
@UnstableApi
const val AUXILIARY_TRACK_TYPE_DEPTH_LINEAR = 2: Int
A linear encoded depth video track.
See https://developer.android.com/static/media/camera/camera2/Dynamic-depth-v1.0.pdf for linear depth encoding.
AUXILIARY_TRACK_TYPE_DEPTH_METADATA
@UnstableApi
const val AUXILIARY_TRACK_TYPE_DEPTH_METADATA = 4: Int
A timed metadata of depth video track.
AUXILIARY_TRACK_TYPE_ORIGINAL
@UnstableApi
const val AUXILIARY_TRACK_TYPE_ORIGINAL = 1: Int
The original video track without any depth based effects applied.
AUXILIARY_TRACK_TYPE_UNDEFINED
@UnstableApi
const val AUXILIARY_TRACK_TYPE_UNDEFINED = 0: Int
Not an auxiliary track or an auxiliary track with an undefined type.
BUFFER_FLAG_ENCRYPTED
@UnstableApi
const val BUFFER_FLAG_ENCRYPTED = 1073741824: Int
Indicates that a buffer is (at least partially) encrypted.
BUFFER_FLAG_END_OF_STREAM
@UnstableApi
const val BUFFER_FLAG_END_OF_STREAM = 4: Int
Flag for empty buffers that signal that the end of the stream was reached.
BUFFER_FLAG_FIRST_SAMPLE
@UnstableApi
const val BUFFER_FLAG_FIRST_SAMPLE = 134217728: Int
Indicates that a buffer is known to contain the first media sample of the stream.
BUFFER_FLAG_HAS_SUPPLEMENTAL_DATA
@UnstableApi
const val BUFFER_FLAG_HAS_SUPPLEMENTAL_DATA = 268435456: Int
Indicates that a buffer has supplemental data.
BUFFER_FLAG_KEY_FRAME
@UnstableApi
const val BUFFER_FLAG_KEY_FRAME = 1: Int
Indicates that a buffer holds a synchronization sample.
BUFFER_FLAG_LAST_SAMPLE
@UnstableApi
const val BUFFER_FLAG_LAST_SAMPLE = 536870912: Int
Indicates that a buffer is known to contain the last media sample of the stream.
BUFFER_FLAG_NOT_DEPENDED_ON
@UnstableApi
const val BUFFER_FLAG_NOT_DEPENDED_ON = 67108864: Int
Indicates that no other buffers depend on the data in this buffer.
CENC_TYPE_cbc1
@UnstableApi
const val CENC_TYPE_cbc1 = "cbc1": String!
"cbc1" scheme type name as defined in ISO/IEC 23001-7:2016.
CENC_TYPE_cbcs
@UnstableApi
const val CENC_TYPE_cbcs = "cbcs": String!
"cbcs" scheme type name as defined in ISO/IEC 23001-7:2016.
CENC_TYPE_cenc
@UnstableApi
const val CENC_TYPE_cenc = "cenc": String!
"cenc" scheme type name as defined in ISO/IEC 23001-7:2016.
CENC_TYPE_cens
@UnstableApi
const val CENC_TYPE_cens = "cens": String!
"cens" scheme type name as defined in ISO/IEC 23001-7:2016.
CLEARKEY_UUID
const val CLEARKEY_UUID: UUID!
UUID for the ClearKey DRM scheme.
ClearKey is supported on Android devices running Android 5.0 (API Level 21) and up.
COLOR_TRANSFER_GAMMA_2_2
@UnstableApi
const val COLOR_TRANSFER_GAMMA_2_2 = 10: Int
See TRANSFER_GAMMA2_2. The Gamma 2.2 transfer function, used for some SDR use-cases like tone-mapping.
COLOR_TRANSFER_SDR
@UnstableApi
const val COLOR_TRANSFER_SDR = 3: Int
See COLOR_TRANSFER_SDR_VIDEO. The SMPTE 170M transfer function.
COLOR_TRANSFER_SRGB
@UnstableApi
const val COLOR_TRANSFER_SRGB = 2: Int
See TRANSFER_SRGB. The standard RGB transfer function, used for some SDR use-cases like image input.
CONTENT_TYPE_OTHER
const val CONTENT_TYPE_OTHER = 4: Int
Value representing files other than DASH, HLS or Smooth Streaming manifests, or RTSP URIs.
CRYPTO_TYPE_CUSTOM_BASE
const val CRYPTO_TYPE_CUSTOM_BASE = 10000: Int
Applications or extensions may define custom CRYPTO_TYPE_* constants greater than or equal to this value.
CRYPTO_TYPE_FRAMEWORK
const val CRYPTO_TYPE_FRAMEWORK = 2: Int
Framework crypto in which a MediaCodec is configured with a MediaCrypto.
DATA_TYPE_CUSTOM_BASE
@UnstableApi
const val DATA_TYPE_CUSTOM_BASE = 10000: Int
Applications or extensions may define custom DATA_TYPE_* constants greater than or equal to this value.
DATA_TYPE_DRM
@UnstableApi
const val DATA_TYPE_DRM = 3: Int
A data type constant for drm or encryption data.
DATA_TYPE_MANIFEST
@UnstableApi
const val DATA_TYPE_MANIFEST = 4: Int
A data type constant for a manifest file.
DATA_TYPE_MEDIA
@UnstableApi
const val DATA_TYPE_MEDIA = 1: Int
A data type constant for media, typically containing media samples.
DATA_TYPE_MEDIA_INITIALIZATION
@UnstableApi
const val DATA_TYPE_MEDIA_INITIALIZATION = 2: Int
A data type constant for media, typically containing only initialization data.
DATA_TYPE_MEDIA_PROGRESSIVE_LIVE
@UnstableApi
const val DATA_TYPE_MEDIA_PROGRESSIVE_LIVE = 7: Int
A data type constant for live progressive media streams, typically containing media samples.
DATA_TYPE_TIME_SYNCHRONIZATION
@UnstableApi
const val DATA_TYPE_TIME_SYNCHRONIZATION = 5: Int
A data type constant for time synchronization data.
DATA_TYPE_UNKNOWN
@UnstableApi
const val DATA_TYPE_UNKNOWN = 0: Int
A data type constant for data of unknown or unspecified type.
DEFAULT_BUFFER_SEGMENT_SIZE
@UnstableApi
const val DEFAULT_BUFFER_SEGMENT_SIZE = 65536: Int
A default size in bytes for an individual allocation that forms part of a larger buffer.
DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS
const val DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS = 3000: Long
A default maximum position for which a seek to previous will seek to the previous window, in milliseconds.
DEFAULT_SEEK_BACK_INCREMENT_MS
const val DEFAULT_SEEK_BACK_INCREMENT_MS = 5000: Long
A default seek back increment, in milliseconds.
DEFAULT_SEEK_FORWARD_INCREMENT_MS
const val DEFAULT_SEEK_FORWARD_INCREMENT_MS = 15000: Long
A default seek forward increment, in milliseconds.
ENCODING_AAC_ER_BSAC
@UnstableApi
const val ENCODING_AAC_ER_BSAC = 1073741824: Int
AAC Error Resilient Bit-Sliced Arithmetic Coding.
ENCODING_PCM_16BIT_BIG_ENDIAN
@UnstableApi
const val ENCODING_PCM_16BIT_BIG_ENDIAN = 268435456: Int
Like ENCODING_PCM_16BIT, but with the bytes in big endian order.
ENCODING_PCM_24BIT_BIG_ENDIAN
@UnstableApi
const val ENCODING_PCM_24BIT_BIG_ENDIAN = 1342177280: Int
Like ENCODING_PCM_24BIT but with the bytes in big endian order.
ENCODING_PCM_32BIT_BIG_ENDIAN
@UnstableApi
const val ENCODING_PCM_32BIT_BIG_ENDIAN = 1610612736: Int
Like ENCODING_PCM_32BIT but with the bytes in big endian order.
FIRST_FRAME_NOT_RENDERED
@UnstableApi
const val FIRST_FRAME_NOT_RENDERED = 1: Int
The first frame was not rendered after the last reset, output surface or stream change.
FIRST_FRAME_NOT_RENDERED_AFTER_STREAM_CHANGE
@UnstableApi
const val FIRST_FRAME_NOT_RENDERED_AFTER_STREAM_CHANGE = 2: Int
The first frame was not rendered after the last stream change.
FIRST_FRAME_NOT_RENDERED_ONLY_ALLOWED_IF_STARTED
@UnstableApi
const val FIRST_FRAME_NOT_RENDERED_ONLY_ALLOWED_IF_STARTED = 0: Int
The first frame was not rendered yet, and is only allowed to be rendered if the renderer is started.
FIRST_FRAME_RENDERED
@UnstableApi
const val FIRST_FRAME_RENDERED = 3: Int
The first frame was rendered.
FORMAT_EXCEEDS_CAPABILITIES
@UnstableApi
const val FORMAT_EXCEEDS_CAPABILITIES = 3: Int
Formats with the same MIME type are supported, but the properties of this format exceed the declared capabilities. There is a chance playback with this format is still possible in practice because some components report their capabilities conservatively, but the expected outcome is that playback will fail.
Example: A player is capable of rendering H264 and the format's MIME type is
MimeTypes#VIDEO_H264, but the format's resolution exceeds the maximum limit supported by the underlying H264 decoder.
FORMAT_UNSUPPORTED_DRM
@UnstableApi
const val FORMAT_UNSUPPORTED_DRM = 2: Int
Formats with the same MIME type are supported, but this format's DRM protection is not supported.
Example: The player is capable of rendering H264 and the format's MIME type is VIDEO_H264, but the format indicates PlayReady DRM protection whereas the renderer only supports Widevine.
FORMAT_UNSUPPORTED_SUBTYPE
@UnstableApi
const val FORMAT_UNSUPPORTED_SUBTYPE = 1: Int
Formats with the same type of media (e.g. video, audio, image or text) are generally supported, but not this format.
Example: The player supports audio and the format's MIME type is for audio, but there does not exist a suitable decoder for this format's MIME type.
FORMAT_UNSUPPORTED_TYPE
@UnstableApi
const val FORMAT_UNSUPPORTED_TYPE = 0: Int
The format is unsupported, because no formats with the same type of media (e.g. video, audio, image or text) are supported or there is only specialized support for different MIME types of the same type.
Example 1: The player is a general purpose audio player, but the format has a video MIME type.
Example 2: The player only has specialized support for AV1 and no general purpose video support, but the format's MIME type is VIDEO_H264.
LANGUAGE_UNDETERMINED
const val LANGUAGE_UNDETERMINED = "und": String!
Represents an undetermined language as an ISO 639-2 language code.
MEDIA_CODEC_PRIORITY_NON_REALTIME
@UnstableApi
const val MEDIA_CODEC_PRIORITY_NON_REALTIME = 1: Int
A non-realtime (as fast as possible) codec priority.
MEDIA_CODEC_PRIORITY_REALTIME
@UnstableApi
const val MEDIA_CODEC_PRIORITY_REALTIME = 0: Int
A realtime codec priority.
MICROS_PER_SECOND
@UnstableApi
const val MICROS_PER_SECOND = 1000000: Long
The number of microseconds in one second.
MILLIS_PER_SECOND
@UnstableApi
const val MILLIS_PER_SECOND = 1000: Long
The number of milliseconds in one second.
NANOS_PER_SECOND
@UnstableApi
const val NANOS_PER_SECOND = 1000000000: Long
The number of nanoseconds in one second.
NETWORK_TYPE_2G
@UnstableApi
const val NETWORK_TYPE_2G = 3: Int
Network type for a 2G cellular connection.
NETWORK_TYPE_3G
@UnstableApi
const val NETWORK_TYPE_3G = 4: Int
Network type for a 3G cellular connection.
NETWORK_TYPE_4G
@UnstableApi
const val NETWORK_TYPE_4G = 5: Int
Network type for a 4G cellular connection.
NETWORK_TYPE_5G_NSA
@UnstableApi
const val NETWORK_TYPE_5G_NSA = 10: Int
Network type for a 5G non-stand-alone (NSA) cellular connection.
NETWORK_TYPE_5G_SA
@UnstableApi
const val NETWORK_TYPE_5G_SA = 9: Int
Network type for a 5G stand-alone (SA) cellular connection.
NETWORK_TYPE_CELLULAR_UNKNOWN
@UnstableApi
const val NETWORK_TYPE_CELLULAR_UNKNOWN = 6: Int
Network type for cellular connections which cannot be mapped to one of NETWORK_TYPE_2G, NETWORK_TYPE_3G, or NETWORK_TYPE_4G.
NETWORK_TYPE_ETHERNET
@UnstableApi
const val NETWORK_TYPE_ETHERNET = 7: Int
Network type for an Ethernet connection.
NETWORK_TYPE_OTHER
@UnstableApi
const val NETWORK_TYPE_OTHER = 8: Int
Network type for other connections which are not Wifi or cellular (e.g. VPN, Bluetooth).
NETWORK_TYPE_WIFI
@UnstableApi
const val NETWORK_TYPE_WIFI = 2: Int
Network type for a Wifi connection.
PERCENTAGE_UNSET
@UnstableApi
const val PERCENTAGE_UNSET = -1: Int
Represents an unset or unknown percentage.
PLAYREADY_UUID
const val PLAYREADY_UUID: UUID!
UUID for the PlayReady DRM scheme.
PlayReady is supported on all AndroidTV devices. Note that most other Android devices do not provide PlayReady support.
PRIORITY_DOWNLOAD
@UnstableApi
const val PRIORITY_DOWNLOAD = -4000: Int
Priority for media downloading unrelated to active playback.
PRIORITY_PLAYBACK
@UnstableApi
const val PRIORITY_PLAYBACK = -1000: Int
Priority for active media playback.
PRIORITY_PLAYBACK_PRELOAD
@UnstableApi
const val PRIORITY_PLAYBACK_PRELOAD = -3000: Int
Priority for preloading media playback resources before the playback becomes active.
PRIORITY_PROCESSING_BACKGROUND
@UnstableApi
const val PRIORITY_PROCESSING_BACKGROUND = -4000: Int
Priority for processing media in the background (for example, when the user is not waiting for the processing to complete).
PRIORITY_PROCESSING_FOREGROUND
@UnstableApi
const val PRIORITY_PROCESSING_FOREGROUND = -2000: Int
Priority for processing media in the foreground (for example, while the user is waiting for the processing to complete).
PROJECTION_EQUIRECTANGULAR
@UnstableApi
const val PROJECTION_EQUIRECTANGULAR = 1: Int
Equirectangular spherical projection.
PROJECTION_RECTANGULAR
@UnstableApi
const val PROJECTION_RECTANGULAR = 0: Int
Conventional rectangular projection.
RATE_UNSET_INT
@UnstableApi
const val RATE_UNSET_INT = -2147483647: Int
Represents an unset or unknown integer rate.
RESULT_BUFFER_READ
@UnstableApi
const val RESULT_BUFFER_READ = -4: Int
A return value for methods where a buffer was read.
RESULT_END_OF_INPUT
@UnstableApi
const val RESULT_END_OF_INPUT = -1: Int
A return value for methods where the end of an input was encountered.
RESULT_FORMAT_READ
@UnstableApi
const val RESULT_FORMAT_READ = -5: Int
A return value for methods where a format was read.
RESULT_MAX_LENGTH_EXCEEDED
@UnstableApi
const val RESULT_MAX_LENGTH_EXCEEDED = -2: Int
A return value for methods where the length of parsed data exceeds the maximum length allowed.
RESULT_NOTHING_READ
@UnstableApi
const val RESULT_NOTHING_READ = -3: Int
A return value for methods where nothing was read.
ROLE_FLAG_ALTERNATE
const val ROLE_FLAG_ALTERNATE = 2: Int
Indicates an alternate track. For example a video track recorded from an different view point than the main track(s).
ROLE_FLAG_AUXILIARY
const val ROLE_FLAG_AUXILIARY = 32768: Int
Indicates an auxiliary track. An auxiliary track provides additional information about other tracks and is generally not meant for stand-alone playback, but rather for further processing in conjunction with other tracks (for example, a track with depth information).
ROLE_FLAG_CAPTION
const val ROLE_FLAG_CAPTION = 64: Int
Indicates the track contains captions. This flag may be set on video tracks to indicate the presence of burned in captions.
ROLE_FLAG_COMMENTARY
const val ROLE_FLAG_COMMENTARY = 8: Int
Indicates the track contains commentary, for example from the director.
ROLE_FLAG_DESCRIBES_MUSIC_AND_SOUND
const val ROLE_FLAG_DESCRIBES_MUSIC_AND_SOUND = 1024: Int
Indicates the track contains a textual description of music and sound.
ROLE_FLAG_DESCRIBES_VIDEO
const val ROLE_FLAG_DESCRIBES_VIDEO = 512: Int
Indicates the track contains an audio or textual description of a video track.
ROLE_FLAG_DUB
const val ROLE_FLAG_DUB = 16: Int
Indicates the track is in a different language from the original, for example dubbed audio or translated captions.
ROLE_FLAG_EASY_TO_READ
const val ROLE_FLAG_EASY_TO_READ = 8192: Int
Indicates the track contains a text that has been edited for ease of reading.
ROLE_FLAG_EMERGENCY
const val ROLE_FLAG_EMERGENCY = 32: Int
Indicates the track contains information about a current emergency.
ROLE_FLAG_ENHANCED_DIALOG_INTELLIGIBILITY
const val ROLE_FLAG_ENHANCED_DIALOG_INTELLIGIBILITY = 2048: Int
Indicates the track is designed for improved intelligibility of dialogue.
ROLE_FLAG_SIGN
const val ROLE_FLAG_SIGN = 256: Int
Indicates the track contains a visual sign-language interpretation of an audio track.
ROLE_FLAG_SUBTITLE
const val ROLE_FLAG_SUBTITLE = 128: Int
Indicates the track contains subtitles. This flag may be set on video tracks to indicate the presence of burned in subtitles.
ROLE_FLAG_SUPPLEMENTARY
const val ROLE_FLAG_SUPPLEMENTARY = 4: Int
Indicates a supplementary track, meaning the track has lower importance than the main track(s). For example a video track that provides a visual accompaniment to a main audio track.
ROLE_FLAG_TRANSCRIBES_DIALOG
const val ROLE_FLAG_TRANSCRIBES_DIALOG = 4096: Int
Indicates the track contains a transcription of spoken dialog.
ROLE_FLAG_TRICK_PLAY
const val ROLE_FLAG_TRICK_PLAY = 16384: Int
Indicates the track is intended for trick play.
SANS_SERIF_NAME
@UnstableApi
const val SANS_SERIF_NAME = "sans-serif": String!
The name of the sans-serif font family.
SELECTION_FLAG_AUTOSELECT
const val SELECTION_FLAG_AUTOSELECT = 4: Int
Indicates that the player may choose to play the track in absence of an explicit user preference.
SELECTION_FLAG_DEFAULT
const val SELECTION_FLAG_DEFAULT = 1: Int
Indicates that the track should be selected if user preferences do not state otherwise.
SELECTION_FLAG_FORCED
const val SELECTION_FLAG_FORCED = 2: Int
Indicates that the track should be selected if its language matches the language of the selected audio track and user preferences do not state otherwise. Only applies to text tracks.
Tracks with this flag generally provide translation for elements that don't match the declared language of the selected audio track (e.g. speech in an alien language). See Netflix's summary for more info.
SELECTION_REASON_ADAPTIVE
@UnstableApi
const val SELECTION_REASON_ADAPTIVE = 3: Int
A selection reason constant for an adaptive track selection.
SELECTION_REASON_CUSTOM_BASE
@UnstableApi
const val SELECTION_REASON_CUSTOM_BASE = 10000: Int
Applications or extensions may define custom SELECTION_REASON_* constants greater than or equal to this value.
SELECTION_REASON_INITIAL
@UnstableApi
const val SELECTION_REASON_INITIAL = 1: Int
A selection reason constant for an initial track selection.
SELECTION_REASON_MANUAL
@UnstableApi
const val SELECTION_REASON_MANUAL = 2: Int
A selection reason constant for an manual (i.e. user initiated) track selection.
SELECTION_REASON_TRICK_PLAY
@UnstableApi
const val SELECTION_REASON_TRICK_PLAY = 4: Int
A selection reason constant for a trick play track selection.
SELECTION_REASON_UNKNOWN
@UnstableApi
const val SELECTION_REASON_UNKNOWN = 0: Int
A selection reason constant for selections whose reasons are unknown or unspecified.
SSAI_SCHEME
@UnstableApi
const val SSAI_SCHEME = "ssai": String!
The URI scheme used for content with server side ad insertion.
STEREO_MODE_INTERLEAVED_LEFT_PRIMARY
@UnstableApi
const val STEREO_MODE_INTERLEAVED_LEFT_PRIMARY = 4: Int
Indicates interleaved stereo layout with the left view being the primary view, used with 360/3D/VR videos.
STEREO_MODE_INTERLEAVED_RIGHT_PRIMARY
@UnstableApi
const val STEREO_MODE_INTERLEAVED_RIGHT_PRIMARY = 5: Int
Indicates interleaved stereo layout with the right view being the primary view, used with 360/3D/VR videos.
STEREO_MODE_LEFT_RIGHT
@UnstableApi
const val STEREO_MODE_LEFT_RIGHT = 2: Int
Indicates Left-Right stereo layout, used with 360/3D/VR videos.
STEREO_MODE_MONO
@UnstableApi
const val STEREO_MODE_MONO = 0: Int
Indicates Monoscopic stereo layout, used with 360/3D/VR videos.
STEREO_MODE_STEREO_MESH
@UnstableApi
const val STEREO_MODE_STEREO_MESH = 3: Int
Indicates a stereo layout where the left and right eyes have separate meshes, used with 360/3D/VR videos.
STEREO_MODE_TOP_BOTTOM
@UnstableApi
const val STEREO_MODE_TOP_BOTTOM = 1: Int
Indicates Top-Bottom stereo layout, used with 360/3D/VR videos.
STREAM_TYPE_ACCESSIBILITY
@UnstableApi
const val STREAM_TYPE_ACCESSIBILITY = 10: Int
See STREAM_ACCESSIBILITY.
STREAM_TYPE_DEFAULT
@UnstableApi
const val STREAM_TYPE_DEFAULT = 3: Int
The default stream type used by audio renderers. Equal to STREAM_TYPE_MUSIC.
STREAM_TYPE_NOTIFICATION
@UnstableApi
const val STREAM_TYPE_NOTIFICATION = 5: Int
See STREAM_NOTIFICATION.
TEXTURE_MIN_FILTER_LINEAR
@UnstableApi
const val TEXTURE_MIN_FILTER_LINEAR = 9729: Int
Returns the weighted average of the four texture elements that are closest to the specified texture coordinates.
TEXTURE_MIN_FILTER_LINEAR_MIPMAP_LINEAR
@UnstableApi
const val TEXTURE_MIN_FILTER_LINEAR_MIPMAP_LINEAR = 9987: Int
Chooses the two mipmaps that most closely match the size of the pixel being textured and uses the TEXTURE_MIN_FILTER_LINEAR criterion (a weighted average of the texture elements that are closest to the specified texture coordinates) to produce a texture value from each mipmap. The final texture value is a weighted average of those two values.
TIME_END_OF_SOURCE
const val TIME_END_OF_SOURCE = -9223372036854775808: Long
Special constant representing a time corresponding to the end of a source. Suitable for use in any time base.
TIME_UNSET
const val TIME_UNSET = -9223372036854775807: Long
Special constant representing an unset or unknown time or duration. Suitable for use in any time base.
TRACK_TYPE_CAMERA_MOTION
const val TRACK_TYPE_CAMERA_MOTION = 6: Int
A type constant for camera motion tracks.
TRACK_TYPE_CUSTOM_BASE
const val TRACK_TYPE_CUSTOM_BASE = 10000: Int
Applications or extensions may define custom TRACK_TYPE_* constants greater than or equal to this value.
TRACK_TYPE_DEFAULT
const val TRACK_TYPE_DEFAULT = 0: Int
A type constant for tracks of some default type, where the type itself is unknown.
TRACK_TYPE_UNKNOWN
const val TRACK_TYPE_UNKNOWN = -1: Int
A type constant for tracks of unknown type.
USAGE_NOTIFICATION_COMMUNICATION_DELAYED
const val USAGE_NOTIFICATION_COMMUNICATION_DELAYED = 9: Int
USAGE_NOTIFICATION_COMMUNICATION_INSTANT
const val USAGE_NOTIFICATION_COMMUNICATION_INSTANT = 8: Int
USAGE_NOTIFICATION_COMMUNICATION_REQUEST
const val USAGE_NOTIFICATION_COMMUNICATION_REQUEST = 7: Int
VIDEO_CHANGE_FRAME_RATE_STRATEGY_OFF
@UnstableApi
const val VIDEO_CHANGE_FRAME_RATE_STRATEGY_OFF = -2147483648: Int
Strategy to never call setFrameRate. Use this strategy if you prefer to call setFrameRate directly from application code.
VIDEO_CHANGE_FRAME_RATE_STRATEGY_ONLY_IF_SEAMLESS
@UnstableApi
const val VIDEO_CHANGE_FRAME_RATE_STRATEGY_ONLY_IF_SEAMLESS = 0: Int
Strategy to call setFrameRate with CHANGE_FRAME_RATE_ONLY_IF_SEAMLESS when the output frame rate is known.
VIDEO_OUTPUT_MODE_NONE
@UnstableApi
const val VIDEO_OUTPUT_MODE_NONE = -1: Int
Video decoder output mode is not set.
VIDEO_OUTPUT_MODE_SURFACE_YUV
@UnstableApi
const val VIDEO_OUTPUT_MODE_SURFACE_YUV = 1: Int
Video decoder output mode that renders 4:2:0 YUV planes directly to a surface.
VIDEO_OUTPUT_MODE_YUV
@UnstableApi
const val VIDEO_OUTPUT_MODE_YUV = 0: Int
Video decoder output mode that outputs raw 4:2:0 YUV planes.
VIDEO_SCALING_MODE_DEFAULT
@UnstableApi
const val VIDEO_SCALING_MODE_DEFAULT = 1: Int
A default video scaling mode for MediaCodec-based renderers.
VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING
@UnstableApi
const val VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING = 2: Int
VOLUME_OPERATION_TYPE_MUTE
@UnstableApi
const val VOLUME_OPERATION_TYPE_MUTE = 1: Int
A volume operation type constant for muting.
VOLUME_OPERATION_TYPE_SET_VOLUME
@UnstableApi
const val VOLUME_OPERATION_TYPE_SET_VOLUME = 0: Int
A volume operation type constant for direct setting of the Player volume.
VOLUME_OPERATION_TYPE_UNMUTE
@UnstableApi
const val VOLUME_OPERATION_TYPE_UNMUTE = 2: Int
A volume operation type constant for unmuting.
WAKE_MODE_LOCAL
const val WAKE_MODE_LOCAL = 1: Int
A wake mode that will cause the player to hold a android.os.PowerManager.WakeLock during playback.
This is suitable for applications that play media with the screen off, but do not require low-latency Wifi access while the screen is on.
WAKE_MODE_NETWORK
const val WAKE_MODE_NETWORK = 2: Int
A wake mode that will cause the player to hold a android.os.PowerManager.WakeLock and a android.net.wifi.WifiManager.WifiLock during playback.
This is suitable for applications that play media with the screen off or require low-latency Wifi access while the screen is on.
Note that on API 33 and below, this mode also puts the Wifi in "high-power" mode, which may help maintain a steady Wifi connection during screen off playback on some devices.
WAKE_MODE_NONE
const val WAKE_MODE_NONE = 0: Int
A wake mode that will not cause the player to hold any locks.
This is suitable for applications that only play media with the screen on and do not require low-latency Wifi access.
WIDEVINE_UUID
const val WIDEVINE_UUID: UUID!
UUID for the Widevine DRM scheme.
Widevine is supported on Android devices running Android 4.3 (API Level 18) and up.
Public functions
generateAudioSessionIdV21
@UnstableApi
@InlineMe(replacement = "Util.generateAudioSessionIdV21(context)", imports = [""androidx.media3.common.util.Util""])
java-static fungenerateAudioSessionIdV21(context: Context!): Int
getErrorCodeForMediaDrmErrorCode
@UnstableApi
@InlineMe(replacement = "Util.getErrorCodeForMediaDrmErrorCode(mediaDrmErrorCode)", imports = [""androidx.media3.common.util.Util""])
@PlaybackException.ErrorCode
java-static fungetErrorCodeForMediaDrmErrorCode(mediaDrmErrorCode: Int): Int
getFormatSupportString
@UnstableApi
@InlineMe(replacement = "Util.getFormatSupportString(formatSupport)", imports = [""androidx.media3.common.util.Util""])
java-static fungetFormatSupportString(@C.FormatSupport formatSupport: Int): String!
msToUs
@UnstableApi
@InlineMe(replacement = "Util.msToUs(timeMs)", imports = [""androidx.media3.common.util.Util""])
java-static funmsToUs(timeMs: Long): Long
usToMs
@UnstableApi
@InlineMe(replacement = "Util.usToMs(timeUs)", imports = [""androidx.media3.common.util.Util""])
java-static funusToMs(timeUs: Long): Long