mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00

This is the first commit out of two. This change adds the missing event flags for the onEvents() callback when MediaController is connected to a media3 session (see MediaControllerImplBase). I updated the MediaControllerListenerTest and MediaControllerStateMaskingTest with assertions that on onEvents() is called alongside individual Player.Listener callbacks. There will be a follow-up change for the case where a MediaController is connected to a legacy MediaSession (MediaControllerImplLegacy). I've split this in two separate changes to make the size of the commit manageable for reviewing. #minor-release PiperOrigin-RevId: 481933437 (cherry picked from commit 46d5a0e33bd562cd9e6420b342a68bf112847f83)
Session module
This module provides media session functionality through which media information and controls can be exposed to the Android platform, as well as to other processes and applications.
Getting the module
The easiest way to get the module is to add it as a gradle dependency:
implementation 'androidx.media3:media3-session:1.X.X'
where 1.X.X
is the version, which must match the version of the other media
modules being used.
Alternatively, you can clone this GitHub project and depend on the module locally. Instructions for doing this can be found in the top level README.