Media‐3 Playback Components - devrath/MediaAlchemySuite GitHub Wiki
| Class | Description | Implementation Note |
|---|---|---|
Player |
Interface that defines core media controls like play, pause, and seek. | In Media3, it's a common API implemented by components like MediaSession and MediaController. |
ExoPlayer |
Default implementation of the Player interface in Media3. |
Provides full playback capabilities and is highly customizable for advanced use cases. |

- It holds the
Playerand thePlayerSessionin a separate service from your player activity. - It does this to facilitate background playback.
- It is similar to
media session service, but instead it will hold the additional API's to serve your content library to media apps.
- Media session enables your app to interact with the player
- It advertises your media playback commands externally
- It also receives the commands from external sources
- It is a class that is used to send commands from outside the app.
- Example is
other appor thesystem itself. - The commands are sent to the
underlying playerof the associatedmedia session. -
MediaControllerclass implements theplayerinterface. - When we call a method, the command gets sent to the associated
media-session. - Client apps like
Google Assistantuse themedia-controllerto control the playback in the media session.
- It allows the user to navigate through the media in the app and select which item to play.
-
MediaBrowserimplements bothPlayerand theMediaControllerinterfaces. - Client app such as
Android AutoimplementsMediaBrowser.
| Class | Description | Implementation Note |
|---|---|---|
PlayerView |
A default Android View to display video along with playback controls. | Works with ExoPlayer, MediaController, or any custom Player. Provides a full-featured media UI. |
PlayerSurface |
A Jetpack Compose @Composable used purely for rendering video frames. |
Connects to any Player. Does not include controls. Supports resizing via ContentScale. Part of Media3 Compose UI utilities. |