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
PlayerNotificationManager: support custom queue navigation #5771
Comments
Thanks for your request. Do I understand correctly that you never have more than a single window in the timeline? Meaning you are not using If this is the case I think just making Disabling all built in actions and using a Can you confirm my assumption about how you do Aside: all actions except next/previous are delegated to a |
Thanks for your response! Yes, there is only a single window in the timeline. It's a customer requirement to only start buffering when the user wants to play the stream and to stop buffering when the users taps on pause. Due to this we can only prepare the source after the user interaction. Yes, it would be feasible to use custom actions for the use case. I have to admit I was just looking for an easier way, i.e. to directly overwrite the play logic methods next() and previous() because everything else would be the same. We already use a custom ControlDispatcher elsewhere so we also reuse the object here and the queue navigator. |
Similar to this request, it would be nice, to be able to not just hide or show the navigation actions, but be able to controll these during the notification manager creation. Our use case, is that we don't want to provide a previous option, or the ability to seek, but do want to provide the option to skip, play, and pause. Currently I have to disable the navigation all together. Which isn't ideal. Custom actions might work, which I'll investigate, but it would be nice to beable to toggle these individually within the notification manager setup. |
@kingargyle - I think you can do that by extending |
Thanks, this looks like a possible solution. The only issue is that the PlayerNotificastionManager itself doesn't make it easy to extend with the number of Static methods that are included to create the notificaton. I'll mess around with this and see what I can get working thought. |
I agree it's not that easy in the general case, but for your specific case I think you can just call |
@ojw28 yea, I managed to get it to work, would still be nice to have setters to toggle them directly without having to override getActions. |
@ojw28 in 2.14.0, the However this only works as long as these constructors exist. Is it planned to keep the constructors without builder around for public access, or would it be possible to add an option to override |
The suggested method doesn't work any more in 2.15.0. Since the constructors have become private, the class can't be extended. We have a customized notification with default and custom actions, with the available actions toggled on or off depending on the played stream (live, video on demand) and playback state (some streams have cue points, the cue point buttons are only visible if there is a cue point to skip to, etc.). For this reason, we currently override |
Thanks for reporting. You are right, that this was broken in 2.15.0. There is a fix for this on dev-v2: 2f09ece |
Great, thanks for the update! |
[REQUIRED] Use case description
I have a custom queue navigator not based on a TimelineQueueNavigator. Inside a media session it works fine, however integration with the PlayerNotificationManager is more cumbersome than necessary. I tried to create a subclass from PlayerNotificationManager but the next() and previous() methods are private and most of the instance variables, so additional work is required. Copy and paste of the PlayerNotificationManager to create a custom version should not be easier than reusing the existing one. It does almost everything I want.
Proposed solution
Enable delegation for queue actions to a custom QueueNavigator (same one as in the mediasession extension) so the onSkipToPrevious and onSkipToNext can be reused. In general is would be awesome to have less objects "private" and be able to supply custom versions easier.
Alternatives considered
Complete custom management of notifications based on the media session.
The text was updated successfully, but these errors were encountered: