What's the correct AVRC rewind/fast-forward methodology? #726
Unanswered
petkorazzi
asked this question in
Q&A
Replies: 2 comments 2 replies
-
in my case the command let the track seek + or -10s once. |
Beta Was this translation helpful? Give feedback.
1 reply
-
For AVRC to work, you need to be connected with an A2DP Source I suggest to add some validation logic to your code to confirm that
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
(Disclaimer: I'm an idiot-level coder who doesn't really know what he's doing - just bashing on my keyboard until stuff works.)
How exactly does one use the rewind() and fast_forward() functions?
I wasn't able to find any real documentation, examples, or use cases, and attempting to use them in the same way as the other AVRC functions like play() and next() has not been successful. Here's a basic example of what I've got going on:
The general idea is a typical 4-button control schema with play, stop, prev, and next buttons. Holding the prev or next button should rewind or fast-forward, and letting go should resume play. Admittedly this was done under the assumption that the rewind() and fast_forward() functions would be continuous - for example, calling the fast_forward() function would cause [whatever media] to fast forward until you tell it to stop. This seemed supported by esp_avrc_playback_stat_t playback having values for forward and reverse seeking (3 and 4 respectively).
I've confirmed that the long-press functionality works; it's not an issue with button code. To be sure, I also tried swapping one of the short-press button code sections with the rewind() and fast_forward() functions with no luck. These functions just don't seem to do anything at all.
I found this in BluetoothA2DPSink.cpp:
In particular, this bit:
Again, I'm an idiot and may be reading this entirely wrong - but is that basically saying that any AVRC function you call is only "pressing the button" for 100ms? If so, that may not matter for must functions but for seeking it definitely would I would think? But that also doesn't make sense - I may not know things but the person(s) who made this library do, and I don't see tons of "these functions don't work" issues or discussion in here.
So...this has got to be something I'm doing wrong. How do I do it right?
Beta Was this translation helpful? Give feedback.
All reactions