Skip to content

Switch Media Session connector to androidx.media3.session #99

Description

@MattiasBuelens

Our MediaSession connector currently integrates with android.support.v4.media.session.MediaSessionCompat. However, that API is now deprecated, and Google recommends switching to androidx.media3.session.MediaSession.

This won't be a simple migration. Media3 is built around a common Player interface, and the MediaSession expects you to pass a Player so it can be controlled remotely by a MediaController (which itself implements Player).

The most natural way for us to support this, would be to implement the Player interface ourselves on top of the THEOplayer API. This would allow you to use THEOplayer as a Player, and reuse large parts of the AndroidX Media ecosystem (such as MediaSession, but also CastPlayer or PlayerView). We would need to do tons of conversions between the Media3 API and our own API, and we probably won't be able to find a perfect match for every single API. I don't know if we will be able to get away with "partially" supporting the Player API, just enough to get most of MediaSession working. 🤷‍♂️

We could also fork androidx.media3.session and rebuild it on top of our Player API instead. But that seems like a massive maintenance burden. 😅

Better ideas are welcome! 😁

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions