Add seek buttons to notification bar
Description
This MR introduces support for seek buttons in the notification bar. The icon appearance is driven by the enabled actions in the playback session. Inactive icons are now shown as shaded, which helps users understand when their button presses will be accepted or ignored. Podcast mode (shown below) incorporates the seek buttons in the compact view, otherwise prev/next will be shown.
Motivation and Context
This change is a continuation of adding support for seek buttons throughout the various playback control interfaces.
How Has This Been Tested?
Tested on a Pixel 3 running Android 11.
Screenshots
In the screenshot below a podcast is playing, the rate is set to 1.0x, and drawables exist for 10 second skip.
In the screenshot below a podcast is playing, the rate is set to 1.10x, and no drawables exist for the specific seek time.
In the screenshot below an audio file is playing, rate may be 1.0x (no notification bar control), and drawables exist for 10 second skip.
Types of changes
-
New feature (non-breaking change which adds functionality)
Checklist
-
I have read the CONTRIBUTING section of the README document.
Merge request reports
Activity
changed milestone to %3.5.x
added feature label
added 89 commits
-
085a4e83...f0fbdc2c - 87 commits from branch
videolan:master
- 72424c23 - Add support for seeking in notification bar
- c743186d - DRAFT: ICONS FOR NOTIFICATION BAR
-
085a4e83...f0fbdc2c - 87 commits from branch
mentioned in issue #458 (closed)
- Resolved by Robert Stone
@rhstone regarding #458 (comment 300581) can't you use a custom drawable in cover mode to fill it in with whatever time the user puts in? Maybe not in the notification, but at least in the app? I'm sure many people would greatly appreciate that custom drawable to use in their app, including myself. Browsers do this, but I think they have 99 images and switch them out depending on the number of tabs you have open. The proof being that after 100 it is blank, instead of expanding to fit 101... etc. What do you think?
Maybe the notification can display an empty back arrow if it is custom, instead of a number, or maybe pick the nearest number and "<" or ">" before the number to indicate that the interval is more or less than the number indicated.
What do you think?
Edited by Shmuel Sternbach
@rhstone .. thanks .. replying to #458 (comment 300581)
As to the issue with a less common custom seek value for which there's no pregenerated button and therefore rounding to the closest existing.
There could be a list: of predefined values for which such buttons exist to choose from. That'd suggest that the UI works best with one of these. 10, 20, 30, 45, 60 s would probably be sufficient options for almost everyone I guess. If instead of choosing one of these the user sets some odd custom value then you could use some generic button with no number.
This way, there'd be full customizability without much more overhead of creating endless buttons. And most users will probably be fine with one of the predefined values.
- Resolved by Nicolas Pomepuy
@jbk .. well, if you ask me specifically I'd opt for seek buttons over next/previous. But that's because I mostly use a headset that has physical buttons for next/previous.
There could be an entry in the settings for this as well.
- Resolved by Nicolas Pomepuy
@jbk I added a preference (not pushed up yet); however, it reverts back to prev/next if the stream is not seekable. I know the
seekable
boolean isn't a 100% accurate, so the seek buttons are not disabled, just swapped with prev/next. This yields the best experience when switching between local media (seekable), and streaming audio playlists (not seekable, uses prev/next to switch channels).
- Resolved by Robert Stone
- Resolved by Robert Stone
@rhstone Will any of this fast-forward and rewind functionality be available on the Android 7 lock screen (my work tablet which I desperately want this feature on), or just for the Android 10+ MediaStyle player notification change?
Edited by Shmuel Sternbach
added 145 commits
-
c743186d...2cc4078c - 141 commits from branch
videolan:master
- c91ebffe - Add custom action constants
- 33e79148 - Add preference to show seek buttons in the notification bar
- 38742bf7 - Add seek buttons in the notification bar
- ff99e85e - Add new icons for the notification bar
Toggle commit list-
c743186d...2cc4078c - 141 commits from branch
added 6 commits
- 58548e64 - Add custom action constants
- efd73299 - Add preference to show seek buttons in the notification bar
- 5c7ef420 - Add seek buttons in the notification bar
- 227880ea - Add new icons for the notification bar
- 82146da8 - Use audioJumpDelay for fast forward and rewind callback
- d9078a5d - Add custom seek action icons for Auto and Wear
Toggle commit listadded 34 commits
-
4dc3e044...3b8fc53e - 26 commits from branch
videolan:master
- 5fd944c3 - Add extension to retrieve drawable by identifier name
- 67e70892 - Initial implementation of a drawable cache
- e60121ee - Add custom action constants
- 8966dcde - Add preference to show seek buttons in the notification bar
- ed7eae80 - Add seek buttons in the notification bar
- 2bbd89e9 - Add new icons for the notification bar
- b2a00680 - Use audioJumpDelay for fast forward and rewind callback
- 232fd989 - Add custom seek action icons for Auto and Wear
Toggle commit list-
4dc3e044...3b8fc53e - 26 commits from branch
- Resolved by Robert Stone
@rhstone I literally can't wait for this feature to be pushed to stable! How long will it take to get to the app store?
requested review from @Aza
added 14 commits
-
6bb84636...5dce5a96 - 6 commits from branch
videolan:master
- 91dbca4c - Add extension to retrieve drawable by identifier name
- 3ccbcbfb - Initial implementation of a drawable cache
- 487cbdb3 - Add custom action constants
- ec4df3b7 - Add preference to show seek buttons in the notification bar
- ef6a885c - Add seek buttons in the notification bar
- 81627547 - Add new icons for the notification bar
- 4dbe76ff - Use audioJumpDelay for fast forward and rewind callback
- 60c18d86 - Add custom seek action icons for Auto and Wear
Toggle commit list-
6bb84636...5dce5a96 - 6 commits from branch
enabled an automatic merge when the pipeline for 60c18d86 succeeds
mentioned in issue #633 (closed)