InfiniTime
InfiniTime copied to clipboard
Add fast forward rewind to music app
This is my first ever pull request on any open source project. Please feel free to critique me, so I can improve. This pull request adds the feature I requested here: https://github.com/InfiniTimeOrg/InfiniTime/issues/1320
TLDR: I added new buttons to the Music App that allows for fast forwarding and rewinding of content by 10s. I have tested this on a PineTime Dev kit and have found no issues, so far. To test this you will need to make the changes to GadgetBridge I outlined in my issue.
Disclosure: I am not a maintainer, just like the project and new people joining it.
I scrolled through this once and it looks good for me. Have you tested it on the hardware? And you can take a look at the simulator (see the InfiniSim repo ) to test your Code if needed (probably not if you test on hardware) and to make a screenshot or gif of the new UI. Would be interesting how the new buttons look.
Congrats to your first open source PR 🎉

Here is a screenshot of the new buttons. I have tested the code both on the Simulator and on real hardware.
The reason why the simulator is failing to build this code needs to be added to it. Once that is added to the simulator branch everything will build fine. My pull request here: https://github.com/InfiniTimeOrg/InfiniSim/pull/61 fixes the issue.
- sim/components/ble/MusicService.h
static const char EVENT_MUSIC_OPEN = 0xe0;
static const char EVENT_MUSIC_PLAY = 0x00;
static const char EVENT_MUSIC_PAUSE = 0x01;
static const char EVENT_MUSIC_NEXT = 0x03;
static const char EVENT_MUSIC_PREV = 0x04;
static const char EVENT_MUSIC_VOLUP = 0x05;
static const char EVENT_MUSIC_VOLDOWN = 0x06;
// below needs adding
static const char EVENT_MUSIC_FORWARD = 0x07;
static const char EVENT_MUSIC_REWIND = 0x08;
I like it. Now we have to wait for further reviews. This may take some time.
The check for clang-format is failing. Maybe have a look at that.
As much as I would like either rewind or seek functionality, unfortunately do not see it working properly for enough users. Due to that reason I don't think this functionality should be included in base InfiniTime. Tops, maybe behind a compile- or runtime configuration flag.
do not see it working properly for enough users
Honest question: why?
@minacode
Honest question: why?
Not supported by most music players. If enabled runtime when compatibility is detected, then it would be fine.
I don't know how but guess can we find that out on connection to the device, right? Without the user doing anything. The companions would have to decide if they support it.
The companions would have to decide if they support it.
Detect/decide, yes.
I understand like I said in my feature request I had to manually code in support for fast forward and rewind to the GadgetBridge companion app. Even after doing that I only found that VLC works well with the buttons. I am probably a rare user who uses VLC to listen to podcasts, who benefits from this feature.