feat(player): migrate from ExoPlayer 2.18.7 to media3 1.10.1#45
feat(player): migrate from ExoPlayer 2.18.7 to media3 1.10.1#45Priveetee wants to merge 6 commits into
Conversation
|
sorry, mixed up my git on this one :p the branch had dragged in the SABR PoC commits so the diff was a mess. force-pushed a clean one, it's media3-only now (no SABR files), should be sorted :) lmk if anything's off |
96ec5d9 to
5ad6703
Compare
|
Looks good. I'm considering a more aggressive refactor for #46, but it's pretty uncertain right now. |
|
lmaooo no way 😭 we both went media3 at the exact same time, what are the odds okay i'm 100% following your lead on #46, killing the player + VideoDetailFragment tech debt properly beats just repackaging the old player. #45 can stay as the fallback if codex doesn't get it there. sabr doesn't care which player wins anyway: the extractor (InfinityLoop1308/PipePipeExtractor#69) is player-agnostic and the client side is just media3 DataSources, so i'll wire it onto whichever one lands. lmk :) |
5ad6703 to
6229224
Compare
|
i'll continue go with this pr since #46 is proved to be too aggressive. |
|
btw, is there some any specific reason for using 1.4.1? |
|
no real reason behind 1.4.1, it's literally just what came up when i googled media3, copy pasted it and moved on 😅 nothing tied to it, so i'll bump it to a current stable (probably 1.10.1) and make sure nothing breaks. and if you wanna work on this branch or take it further yourself, go for it, no problem at all, the history's all there so it's totally fine by me :) if not no worries, we're used to it by now anyway honestly between codex rewriting half the app and me getting bullied by a decoder, not sure who's been rougher on this repo this week 😂 |
|
@InfinityLoop1308 bumped it to 1.10.1. one heads-up: media3 1.9+ raised its own minSdk to 23 (media3-session), so anything past 1.8.x forces our app minSdk from 21 -> 23, dropping android 5.0/5.1 (api 21/22). i went with 1.10.1 + minSdk 23 (that share is tiny now and the newer framework is worth it), but the compat call is yours. if you'd rather keep api 21 i can pin to 1.8.1 instead, which is the last media3 that still supports minSdk 21. |
…e the HLS tracker factory
4d6406f to
b54c87f
Compare
Migrates the player off ExoPlayer 2.18.7 (EOL/archived) to media3 1.10.1. Independent of SABR, it migrates the whole player (niconico, BiliBili, YouTube non-SABR, everything), so it's its own PR. Tracking: #42.
Related:
Summary
Swaps the player stack from
com.google.android.exoplayer2.*toandroidx.media3.*. The only non-mechanical parts are the media session (media3 has noMediaSessionConnector) and the customHttpDataSources (media3 made the ctor private).Changes
com.google.android.exoplayer2.*->androidx.media3.*across renderers, resolvers, media sources, mediaitem tags, player and helpers.MediaSessionCompat.Callback+ media3Player.Listener), fold in the queue navigator, dropPlayQueueNavigator.PurifiedHttpDataSource/NiconicoLiveHttpDataSourceto delegation (wrap an innerDefaultHttpDataSource).exo_icon_*/exo_media_action_*drawables the media3-ui AAR no longer ships.DefaultLoadControl(each buffer split into a normal + aForLocalPlaybackvalue, same value used for both),ChunkSampleStream(newhandleInitialDiscontinuity/firstChunkStartTimeUs/downloadExecutorargs),DefaultHlsPlaylistTrackerfactory signature.minSdk21 -> 23.Why
ExoPlayer 2 is archived and gets no fixes; media3 is the maintained successor and unblocks newer player work.
Impact / Compatibility
Impact's not that big i think, it's mostly a repackage of the same engine:
androidx.media3.exoplayer.ExoPlayer);com.google.android.exoplayer2is discontinued. Same player engine, not a new one. (migration guide)minSdk21 -> 23: media3-session 1.9+ needs 23, so this drops Android 5.0/5.1. Heads-up since it's the one real compat call here (1.8.1 is the last minSdk-21 line if we'd rather hold on 23).MediaSessionCompat, so media-compat clients (Android Auto,MediaControllerCompat) keep working, which media3 explicitly supports.Validation
JAVA_HOME=<jdk25> ./gradlew :app:assembleDebugNotes