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! 😁
Our MediaSession connector currently integrates with
android.support.v4.media.session.MediaSessionCompat. However, that API is now deprecated, and Google recommends switching toandroidx.media3.session.MediaSession.This won't be a simple migration. Media3 is built around a common
Playerinterface, and theMediaSessionexpects you to pass aPlayerso it can be controlled remotely by aMediaController(which itself implementsPlayer).The most natural way for us to support this, would be to implement the
Playerinterface ourselves on top of the THEOplayer API. This would allow you to use THEOplayer as aPlayer, and reuse large parts of the AndroidX Media ecosystem (such asMediaSession, but alsoCastPlayerorPlayerView). 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 thePlayerAPI, just enough to get most ofMediaSessionworking. 🤷♂️We could also fork
androidx.media3.sessionand rebuild it on top of ourPlayerAPI instead. But that seems like a massive maintenance burden. 😅Better ideas are welcome! 😁