Solution to traditional approach - devrath/MediaAlchemySuite GitHub Wiki

Connecting your player to a media session allows you
- To expose what you are currently playing.
- Allows you to control your player from outside your app.
Basically to control your playback from many different contexts

- After
Android-11
your media will be reflected on the notification bar asmedia control box
. - It can display
metadata
andplayback controls
in the quick settings panel. - Users can control their media using
wear-os using notification
,voice-enabled commands using google assistant
,etc
. - Basically to control your playback from many different contexts.
There were a lot of libraries involved
androidx-media2 |
com.google.android.exoplayer |
---|---|
media2-player |
media2-core |
media2-widget |
media2-ui |
media2-session |
media2-mediasession |
media2-common |
media2-common |
media2-dash |
- Observe there are 2-players, 2-widgets,
2-sessions
,2-common
libraries. - Lot of duplicated code.
- Each with limitations and advantages makes it difficult to know what to use when it comes to compatibility issues.
androidx-media3 |
---|
media3-exoplayer |
media3-ui |
media3-session |
media3-common |
media2-dash |
- As a result one cohesive block of libraries is provided to avoid confusion, compatibility, and a simpler approach.