Mapeamentos do ExoPlayer para Media3

As tabelas a seguir descrevem como as várias classes, pacotes módulo, e os nomes das dependências do Gradle são diferentes entre exoplayer2 e a nova implementação de media3.

Ao migrar para a Media3, leia a nossa biblioteca AndroidX Media3 guia de migração.

Mapeamentos de pacotes

Nome do pacote exoplayer2Nome do pacote media3
com.google.android.exoplayer2.androidx.media3.exoplayer
com.google.android.exoplayer2.analyticsandroidx.media3.exoplayer.analytics
com.google.android.exoplayer2.audioandroidx.media3.exoplayer.audio
com.google.android.exoplayer2.castdemoandroidx.media3.demo.cast
com.google.android.exoplayer2.banco_de_dadosandroidx.media3.database
com.google.android.exoplayer2.decoder,androidx.media3.decoder
com.google.android.exoplayer2.demo.androidx.media3.demo.main
com.google.android.exoplayer2.drmandroidx.media3.exoplayer.drm
com.google.android.exoplayer2.ext.av1androidx.media3.decoder.av1
com.google.android.exoplayer2.ext.castandroidx.media3.cast
com.google.android.exoplayer2.ext.cronetandroidx.media3.datasource.cronet
com.google.android.exoplayer2.ext.ffmpegandroidx.media3.decoder.ffmpeg
com.google.android.exoplayer2.ext.flac.androidx.media3.decoder.flac
com.google.android.exoplayer2.ext.imaandroidx.media3.exoplayer.ima
com.google.android.exoplayer2.ext.androidx.media3.ui.androidx
com.google.android.exoplayer2.ext.okhttpandroidx.media3.datasource.okhttp
com.google.android.exoplayer2.ext.opusandroidx.media3.decoder.opus
com.google.android.exoplayer2.ext.rtmpandroidx.media3.datasource.rtmp
com.google.android.exoplayer2.ext.vp9androidx.media3.decoder.vp9
com.google.android.exoplayer2.ext.workmanagerandroidx.media3.exoplayer.workmanager
com.google.android.exoplayer2.extractorandroidx.media3.extractor
com.google.android.exoplayer2.gldemoandroidx.media3.demo.gl
com.google.android.exoplayer2.mediacodec.androidx.media3.exoplayer.mediacodec
com.google.android.exoplayer2.metadataandroidx.media3.extractor.metadata
com.google.android.exoplayer2.off-lineandroidx.media3.exoplayer.offline
com.google.android.exoplayer2.playbacktestsandroidx.media3.test.exoplayer.playback
com.google.android.exoplayer2.robolectricandroidx.media3.test.utils.robolectric
com.google.android.exoplayer2.schedulerandroidx.media3.exoplayer.scheduler
com.google.android.exoplayer2.sourceandroidx.media3.exoplayer.source
com.google.android.exoplayer2.source.rtspandroidx.media3.exoplayer.rtsp
com.google.android.exoplayer2.source.dashandroidx.media3.exoplayer.dash
com.google.android.exoplayer2.source.smoothstreamingandroidx.media3.exoplayer.smoothstreaming
com.google.android.exoplayer2.source.hlsandroidx.media3.exoplayer.hls
com.google.android.exoplayer2.surfacedemoandroidx.media3.demo.surface
com.google.android.exoplayer2.testdataandroidx.media3.test.data
com.google.android.exoplayer2.testutilandroidx.media3.test.utils
com.google.android.exoplayer2.textoandroidx.media3.extractor.text
com.google.android.exoplayer2.trackselectionandroidx.media3.exoplayer.trackselection
com.google.android.exoplayer2.transformerandroidx.media3.transformer
com.google.android.exoplayer2.transformerdemoandroidx.media3.demo.transformer
com.google.android.exoplayer2.uiandroidx.media3.ui
com.google.android.exoplayer2.upstream.cryptoandroidx.media3.exoplayer.upstream.crypto
com.google.android.exoplayer2.upstream.cacheandroidx.media3.datasource.cache
com.google.android.exoplayer2.upstreamandroidx.media3.datasource
com.google.android.exoplayer2.utilandroidx.media3.exoplayer.util
com.google.android.exoplayer2.utilandroidx.media3.common.util
com.google.android.exoplayer2.video.androidx.media3.exoplayer.video

Renomeação de classes

Nome da classe do exoplayer2Nome do pacote media3Nomes das classes media3
com.google.android.exoplayer2.ExoPlayerLibraryInfoandroidx.media3.commonMediaLibraryInfo
com.google.android.exoplayer2.SimpleExoPlayerandroidx.media3.exoplayerExoPlayer
com.google.android.exoplayer2.ui.StyledPlayerViewandroidx.media3.uiPlayerView
com.google.android.exoplayer2.ui.StyledPlayerControlViewandroidx.media3.uiPlayerControlView

Classe movida para outros pacotes

Nome do pacote exoplayer2 Nome do pacote media3 Nomes das classes media3
com.google.android.exoplayer2.androidx.media3.exoplayerFormatHolder, PlayerMessage
com.google.android.exoplayer2.androidx.media3.commonBasePlayer, BundleListRetriever, Bundleable, ControlDispatcher, C, DefaultControlDispatcher, DeviceInfo, ErrorMessageProvider, ExoPlayerLibraryInfo, Format, ForwardPlayer, HeartRating, IllegalSeekPositionException, MediaItem, MediaMetadata, ParserException, PercentageRating, PlaybackException, PlaybackParameters, Player, PositionInfo, Rating, StarRating, ThumbRating, Linha do tempo, TracksInfo
com.google.android.exoplayer2.audioandroidx.media3.extractorAacUtil, Ac3Util, Ac4Util, DtsUtil, MpegAudioUtil, OpusUtil, WavUtil
com.google.android.exoplayer2.audioandroidx.media3.commonAudioAttribute e AuxEffectInfo
com.google.android.exoplayer2.decoder,androidx.media3.exoplayerDecoderCounters e DecoderReuseEvaluation
com.google.android.exoplayer2.drmandroidx.media3.commonDrmInitData
com.google.android.exoplayer2.metadataandroidx.media3.exoplayer.metadataMetadataDecoderFactor, MetadataOutput, MetadataRenderer
com.google.android.exoplayer2.metadataandroidx.media3.commonMetadados
com.google.android.exoplayer2.off-lineandroidx.media3.commonStreamKey
com.google.android.exoplayer2.source.adsandroidx.media3.commonAdPlaybackState
com.google.android.exoplayer2.sourceandroidx.media3.commonMediaPeriodId e TrackGroup
com.google.android.exoplayer2.trackselectionandroidx.media3.commonTrackSelectionParameter e TrackSelectionOverride
com.google.android.exoplayer2.textoandroidx.media3.common.textSinal
com.google.android.exoplayer2.textoandroidx.media3.exoplayer.textExoplayerCuesDecode, SubtitleDecoderFactor, TextOutput e TextRenderer
com.google.android.exoplayer2.texto.spanandroidx.media3.common.textHorizontalTextInVerticalContextSpan, LanguageFeatureSpa, RubySpa, SpanUti, TextAnnotation, TextEmphasisSpan
com.google.android.exoplayer2.uiandroidx.media3.commonAdOverlayInf e OpenCensusProvider
com.google.android.exoplayer2.uiandroidx.media3.exoplayer.offlineDownloadNotificationHelper
com.google.android.exoplayer2.upstreamandroidx.media3.commonLeitor de dados
com.google.android.exoplayer2.upstreamandroidx.media3.exoplayer.upstreamAllocation, Allocator, BandwidthMeter, CachedRegionTracker, DefaultAllocator, DefaultWidthMeter, DefaultLoadErrorHandlingPolicy, Loader, LoaderErrorThrower, ParsingLoadable, SlidingPercentile, TimeToFirstByteEstimator
com.google.android.exoplayer2.upstream.cryptoandroidx.media3.datasourceAesCipherDataSource, AesCipherDataSink e AesFlushingCipher
com.google.android.exoplayer2.utilandroidx.media3.commonErrorMessageProvider, FlagSet, FileType, MimeType, PriorityTaskManager
com.google.android.exoplayer2.utilandroidx.media3.common.utilAtomicFile, as declarações, você e, e, e, e, as, podem e pacote: e pacote e, e Bundle e e!! e quanto e ClosedSource e. CodecSpecificDataData.
com.google.android.exoplayer2.utilandroidx.media3.extractorNalUnitUtil, ParsableNalUnitBitArray
com.google.android.exoplayer2.utilandroidx.media3.exoplayerMediaClock e StandaloneMediaClock
com.google.android.exoplayer2.video.androidx.media3.commonColorInfo e VideoSize
com.google.android.exoplayer2.video.androidx.media3.extractorAvcConfig, DolbyVisionConfig e HevcConfig

Mapeamentos de dependência

Nome do módulo exoplayer2Nome do módulo media3
Exoplayermedia3-exoplayer
banco de dados do exoplayermedia3-database
fonte-de-dados-exoplayermedia3-fonte de dados
exoplayer-decodificadorDecoder media3
exoplayer-comummedia3-common
Exoplayer-coremedia3-exoplayer
exoplayermedia3-exoplayer-dash
exoplayer-extratormedia3-Extractor
Exoplayer-hlsmedia3-exoplayer-hls
Exoplayer-robolectricutilsmedia3-test-utils-robolectric
Exoplayer-rtspmedia3-exoplayer-rtsp
streaming-suavização do exoplayermedia3-exoplayer-smoothstreaming
Exoplayer-testutilsmedia3-test-utils
exoplayer-transformadorTransformador media3
interface do exoplayerinterface de mídia3
cast de extensãomedia3-cast
extensão-cronetmedia3-fonte-de-dados-cronet
extensão-imamedia3-exoplayer-ima
Extensão - Suportemedia3-ui-contínua
extensão-okhttpmedia3-origem-de-dados-okhttp
extensão -rtmpmedia3-datasource-rtmp
gerenciador de trabalho de extensãomedia3-exoplayer-workmanager