Skip to content
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

Enable Android's Media Controls (Next & Previous) Tracks to go to navigate episodes. #1386

Open
2 tasks done
elvistony opened this issue Oct 18, 2024 · 4 comments
Open
2 tasks done
Labels
enhancement New feature or request

Comments

@elvistony
Copy link
Contributor

Describe your suggested feature

Like music players, would it be too much effort in adding the ability to get the previous track, next track ability to go back or to the next episode (like in the notification bar).

I'm come right into the point, when I use gestures on my headphones/ the next button on my headphone, it would be awesome if it goes to the next episode.

Media Controls Documentation

The same can also improve experience on the tv (I've got a bunch of extra mappable buttons that I can use to trigger a next track or previous track using Button Mapper. If the app could support this track switching it would complete the picture!

Thanks for reading this all the way here.
Warm Regards
Lvz

Other details

Something like this?

Source: Google Music Player

Acknowledgements

  • My suggestion is NOT about adding a new provider
  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
@elvistony elvistony added the enhancement New feature or request label Oct 18, 2024
@fire-light42
Copy link
Collaborator

Cs3 already uses mediasession and notably you should already be able to pause and play videos with the pause button on your headphones.

Additionally cs3 already has a lot of keybindings

fun onKeyDown(act: Activity?, keyCode: Int, event: KeyEvent?) {

@elvistony
Copy link
Contributor Author

Awesome! I hadn't seen these keycodes mentioned elsewhere!...

I did see that the KEYCODES's for NextEpisode and PreviousEpisode was limited to KeyEvent.KEYCODE_MEDIA_NEXT, KeyEvent.KEYCODE_BUTTON_R1, KeyEvent.KEYCODE_N and these wouldn't be present on a regular tv remote.

Could we Add Channel_UP and Channel_DOWN or KEYCODE_NUMPAD_1 and KEYCODE_NUMPAD_2 for accommodating tv remotes.

KeyEvent.KEYCODE_MEDIA_NEXT, KeyEvent.KEYCODE_BUTTON_R1, KeyEvent.KEYCODE_N -> {
PlayerEventType.NextEpisode
}

Source to Keycodes info for Channel_UP and Channel_DOWN : Stackoverflow

 * On TV remotes, increments the television channel. */
KEYCODE_CHANNEL_UP = 166;
/** Channel down key.
 * On TV remotes, decrements the television channel. */
KEYCODE_CHANNEL_DOWN = 167;

Thanks for shedding light to this section of code! I bet I'll be using some of these key events from now on!

Cheers!

@elvistony
Copy link
Contributor Author

If anyone is tracking this Issue, @fire-light42 has merged the update! Great News!

Not sure when a release would be deployed though.

@fire-light42
Copy link
Collaborator

It is already in prerelease, so if you cant want for stable then use the prerelease

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants