androidx.media3.common


Annotations

AdOverlayInfo.Purpose

The purpose of the overlay.

AdPlaybackState.AdState

Represents the state of an ad in an ad group.

C.AudioAllowedCapturePolicy

Capture policies for audio attributes.

C.AudioContentType

Content types for audio attributes.

C.AudioFlags

Flags for audio attributes.

C.AudioUsage

Usage types for audio attributes.

C.BufferFlags

Flags which can apply to a buffer containing a media sample.

C.ColorRange

Video color range.

C.ColorSpace

Video color spaces, also referred to as color standards.

C.ColorTransfer

Video/image color transfer characteristics.

C.ContentType

Represents a streaming or other media type.

C.CryptoMode

Crypto modes for a codec.

C.CryptoType

Types of crypto implementation.

C.DataType

Represents a type of data.

C.Encoding

Represents an audio encoding, or an invalid or unset value.

C.FirstFrameState

State of the first frame in a video renderer.

C.FormatSupport

Level of support for a format.

C.NetworkType

Network connection type.

C.PcmEncoding

Represents a PCM audio encoding, or an invalid or unset value.

C.Projection

Video projection types.

C.RoleFlags

Track role flags.

C.SelectionFlags

Track selection flags.

C.SelectionReason

Represents a reason for selection.

C.SpatializationBehavior

Represents the behavior affecting whether spatialization will be used.

C.StereoMode

The stereo mode for 360/3D/VR videos.

C.StreamType

Stream types for an android.media.AudioTrack.

C.TrackType

Represents a type of media track.

C.VideoChangeFrameRateStrategy

Strategies for calling setFrameRate.

C.VideoOutputMode

Video decoder output modes.

C.VideoScalingMode

Video scaling modes for MediaCodec-based renderers.

C.VolumeFlags

Volume flags to be used when setting or adjusting device volume.

C.WakeMode

Mode specifying whether the player should hold a WakeLock and a WifiLock.

DeviceInfo.PlaybackType

Types of playback.

FileTypes.Type

File types.

Format.CueReplacementBehavior

The replacement behaviors for consecutive samples in a text track of type APPLICATION_MEDIA3_CUES.

MediaMetadata.FolderType

This annotation is deprecated.

Use isBrowsable to indicate if an item is a browsable folder and use mediaType to indicate the type of the folder.

MediaMetadata.MediaType

The type of content described by the media item.

MediaMetadata.PictureType

The picture type of the artwork.

PlaybackException.ErrorCode

Codes that identify causes of player errors.

Player.Command

Commands that indicate which method calls are currently permitted on a particular Player instance.

Player.DiscontinuityReason

Reasons for position discontinuities.

Player.Event

Events that can be reported via onEvents.

Player.MediaItemTransitionReason

Reasons for media item transitions.

Player.PlayWhenReadyChangeReason

Reasons for playWhenReady changes.

Player.PlaybackSuppressionReason

Reason why playback is suppressed even though getPlayWhenReady is true.

Player.RepeatMode

Repeat modes for playback.

Player.State

Playback state.

Player.TimelineChangeReason

Reasons for timeline changes.

TrackSelectionParameters.AudioOffloadPreferences.AudioOffloadMode

The preference level for enabling audio offload on the audio sink.

VideoFrameProcessor.InputType

Specifies how the input frames are made available to the VideoFrameProcessor.

Interfaces

AdViewProvider

Provides information about views for the ad playback UI.

Bundleable

This interface is deprecated.

Interface not needed, call toBundle() on the target object directly.

Bundleable.Creator

This interface is deprecated.

Interface not needed, call fromBundle() on the target type directly.

DataReader

Reads bytes from a data stream.

DebugViewProvider

Provider for views to show diagnostic information during an export, for debugging.

Effect

Marker interface for a video frame effect.

ErrorMessageProvider

Converts throwables into error codes and user readable error messages.

GlObjectsProvider

Provider to customize the creation and maintenance of GL objects.

Metadata.Entry

A metadata entry.

OnInputFrameProcessedListener

A listener for processing input frames.

Player

A media player interface defining high-level functionality, such as the ability to play, pause, seek and query properties of the currently playing media.

Player.Listener

Listener for changes in a Player.

PreviewingVideoGraph

A VideoGraph specific to previewing.

PreviewingVideoGraph.Factory

A factory for creating a PreviewingVideoGraph.

SimpleBasePlayer.PositionSupplier

A supplier for a position.

VideoFrameProcessor

Interface for a video frame processor that applies changes to individual video frames.

VideoFrameProcessor.Factory

A factory for VideoFrameProcessor instances.

VideoFrameProcessor.Listener

Listener for asynchronous frame processing events.

VideoGraph

Represents a graph for processing decoded video frames.

VideoGraph.Listener

Listener for video frame processing events.

Classes

AdOverlayInfo

Provides information about an overlay view shown on top of an ad view group.

AdOverlayInfo.Builder

A builder for AdOverlayInfo instances.

AdPlaybackState

Represents ad group times and information on the state and URIs of ads within each ad group.

AdPlaybackState.AdGroup

Represents a group of ads, with information about their states.

AudioAttributes

Attributes for audio playback, which configure the underlying platform .

AudioAttributes.AudioAttributesV21

A direct wrapper around android.media.AudioAttributes.

AudioAttributes.Builder

Builder for AudioAttributes.

AuxEffectInfo

Represents auxiliary effect information, which can be used to attach an auxiliary effect to an underlying AudioTrack.

BasePlayer

Abstract base Player which implements common implementation independent methods.

BuildConfig
BundleListRetriever

A Binder to transfer a list of Bundles across processes by splitting the list into multiple transactions.

C

Defines constants used by the library.

ColorInfo

Stores color info.

ColorInfo.Builder

Builds ColorInfo instances.

DeviceInfo

Information about the playback device.

DeviceInfo.Builder

Builder for DeviceInfo.

DrmInitData

Initialization data for one or more DRM schemes.

DrmInitData.SchemeData

Scheme initialization data.

FileTypes

Defines common file type constants and helper methods.

FlagSet

A set of integer flags.

FlagSet.Builder

A builder for FlagSet instances.

Format

Represents a media format.

Format.Builder

Builds Format instances.

ForwardingPlayer

A Player that forwards method calls to another Player.

FrameInfo

Value class specifying information about a decoded video frame.

FrameInfo.Builder

A builder for FrameInfo instances.

GlTextureInfo

Contains information describing an OpenGL texture.

HeartRating

A rating expressed as "heart" or "no heart".

Label

A label for a Format.

MediaItem

Representation of a media item.

MediaItem.AdsConfiguration

Configuration for playing back linear ads with a media item.

MediaItem.AdsConfiguration.Builder

Builder for AdsConfiguration instances.

MediaItem.Builder

A builder for MediaItem instances.

MediaItem.ClippingConfiguration

Optionally clips the media item to a custom start and end position.

MediaItem.ClippingConfiguration.Builder

Builder for ClippingConfiguration instances.

MediaItem.ClippingProperties

This class is deprecated.

Use ClippingConfiguration instead.

MediaItem.DrmConfiguration

DRM configuration for a media item.

MediaItem.DrmConfiguration.Builder

Builder for DrmConfiguration.

MediaItem.LiveConfiguration

Live playback configuration.

MediaItem.LiveConfiguration.Builder

Builder for LiveConfiguration instances.

MediaItem.LocalConfiguration

Properties for local playback.

MediaItem.RequestMetadata

Metadata that helps the player to understand a playback request represented by a .

MediaItem.RequestMetadata.Builder

Builder for RequestMetadata instances.

MediaItem.Subtitle

This class is deprecated.

Use MediaItem.SubtitleConfiguration instead

MediaItem.SubtitleConfiguration

Properties for a text track.

MediaItem.SubtitleConfiguration.Builder

Builder for SubtitleConfiguration instances.

MediaLibraryInfo

Information about the media libraries.

MediaMetadata

Metadata of a MediaItem, playlist, or a combination of multiple sources of .

MediaMetadata.Builder

A builder for MediaMetadata instances.

Metadata

A collection of metadata entries.

MimeTypes

Defines common MIME types and helper methods.

PercentageRating

A rating expressed as a percentage.

PlaybackParameters

Parameters that apply to playback, including speed setting.

Player.Commands

A set of commands.

Player.Commands.Builder

A builder for Commands instances.

Player.Events

A set of events.

Player.PositionInfo

Position info describing a playback position involved in a discontinuity.

PriorityTaskManager

Allows tasks with associated priorities to control how they proceed relative to one another.

Rating

A rating for media content.

SimpleBasePlayer

A base implementation for Player that reduces the number of methods to implement to a minimum.

SimpleBasePlayer.MediaItemData

An immutable description of an item in the playlist, containing both static setup information like MediaItem and dynamic data that is generally read from the media like the duration.

SimpleBasePlayer.MediaItemData.Builder

A builder for MediaItemData objects.

SimpleBasePlayer.PeriodData

Data describing the properties of a period inside a MediaItemData.

SimpleBasePlayer.PeriodData.Builder

A builder for PeriodData objects.

SimpleBasePlayer.State

An immutable state description of the player.

SimpleBasePlayer.State.Builder

A builder for State objects.

StarRating

A rating expressed as a fractional number of stars.

StreamKey

A key for a subset of media that can be separately loaded (a "stream").

SurfaceInfo

Immutable value class for a Surface and supporting information.

ThumbRating

A rating expressed as "thumbs up" or "thumbs down".

Timeline

A flexible representation of the structure of media.

Timeline.Period

Holds information about a period in a Timeline.

Timeline.RemotableTimeline

A concrete class of Timeline to restore a Timeline instance from a sent by another process via IBinder.

Timeline.Window

Holds information about a window in a Timeline.

TrackGroup

An immutable group of tracks available within a media stream.

TrackSelectionOverride

A track selection override, consisting of a TrackGroup and the indices of the tracks within the group that should be selected.

TrackSelectionParameters

Parameters for controlling track selection.

TrackSelectionParameters.AudioOffloadPreferences

Preferences and constraints for enabling audio offload.

TrackSelectionParameters.AudioOffloadPreferences.Builder

A builder for AudioOffloadPreferences.

TrackSelectionParameters.Builder

A builder for TrackSelectionParameters.

Tracks

Information about groups of tracks.

Tracks.Group

Information about a single group of tracks, including the underlying TrackGroup, the level to which each track is supported by the player, and whether any of the tracks are selected.

VideoSize

Represents the video size.

Exceptions

IllegalSeekPositionException

Thrown when an attempt is made to seek to a position that does not exist in the player's .

ParserException

Thrown when an error occurs parsing media data and metadata.

PlaybackException

Thrown when a non locally recoverable playback failure occurs.

PriorityTaskManager.PriorityTooLowException

Thrown when task attempts to proceed when another registered task has a higher priority.

VideoFrameProcessingException

Thrown when an exception occurs while preparing an Effect, or applying an Effect to video frames.