-
Notifications
You must be signed in to change notification settings - Fork 300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I remove player commands of the platform mediasession? #542
Comments
How about: media/libraries/session/src/main/java/androidx/media3/session/MediaSession.java Lines 670 to 673 in 5328d64
|
Ideally, the case you described should be handled in this method. @marcbaechinger Am I right in assuming that this is the problem you are currently addressing by moving the channeling the legacy controller through our internal Media3 controller? If so, we can use this issue to track this enhancement (or duplicate it if there already is one). @darrentaft: As a workaround, you can wrap you player in a |
I'm not super-familiar with PiP, but I assume that Picture-in-Picture is connected to the platform session. But yes, using a
The mentioned approach would then also handle this for the notification for which I assume, the controls should be hidden for live in the same way. I'll mark this issue as an enhancement to track the change we are talking about. |
That's great, thanks - I can confirm that ForwardingPlayer removes the play/pause button (although bizarrely it only disables the skip back/forward buttons, rather than removing them). That's good enough for now though. |
I think the button being disabled only may be the problem we have for Auto as well and is described in #339 |
We offer live DASH streams within our app. We're using our own custom player controls, so have full control over what the user can do - i.e. when it's on-demand content we allow them to seek/pause/skip/etc, but when it's live they can only stop the stream.
With the standard integration of Media3 into MediaSession, we're finding that the Picture-In-Picture window is automatically offering player controls. This is great for on-demand content, but for our live streams we don't want the user being able to pause or seek the stream (as there's only a 44 second seekable window).
I can see a "setAvailableCommands" option on the MediaSession, however I can't work out where to get the additional "controller" and "sessionCommands" parameters from. I tried using the listener onConnect() approach, but it had no effect.
Google hasn't helped me find any suitable answers - either for Media3, or for ExoPlayer.
The text was updated successfully, but these errors were encountered: