-
Notifications
You must be signed in to change notification settings - Fork 415
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
Add forwarding player with simplified extension points that ensure consistency (e.g. ForwardingSimpleBasePlayer) #1183
Comments
Hello, is there any development on this question? :) |
I think the session gets the available commands via the So for that to work with a It would be an option to make this easier when |
Correctly changing the available commands using We're aware this is fiddly and error-prone, and we have an internal issue (b/323900817) to experiment with adding a |
MediaController
does not respect overridden methods in Player
?This utility helps apps to forward to another Player while overriding selected behavior or state values. The advantage to a ForwardingPlayer is that the SimpleBasePlayer base class keeps ensuring correctness, listener handling etc. The default forwarding logic tries to stay as close as possible to the original method calls, even if not strictly required by the Player interface (e.g. calling single item addMediaItem instead of addMediaItems if only one item is added). Issue: #1183 PiperOrigin-RevId: 650155924
I have a similar issue to the one described here.
Based on the data I have in
MediaMetadata
I want to have control whetherCOMMAND_SEEK_TO_NEXT
is available or not.To reproduce issue from demo application, I altered data in
catalog.json
fromdemos/session_service
and changedartist
for few media items to empty strings inElectronic
category. Then I wrappedExoPlayer
withForwardingPlayer
inDemoPlaybackService
When I run the code,
ExoPlayer
inPlayerActivity
displays thatexo_next
button is always available, even though when I click this button it sets some strange state in the player (no progress, old media item still plays).But, when I add exactly the same code to the
PlayerActivity
exo_next
button displays state correctly.With this info I have few questions:
MediaController
respect what's insideForwardingPlayer
to be correctly shown in theplayerView.player
?seekToNext
? This one is strange, because in my application overriding those methods in our implementation ofPlayer
interface is enough to control the behaviour of media notification.ExoPlayer
in only one place (service) to get it work correctly?The text was updated successfully, but these errors were encountered: