Getting two commands from control center

Hi,


It seems that when I press "next" on control center when playing something, my code gets called on twice instead of once, using MPRemoteCommandCenter.


The two calls:

1. nextTrackCommand

2. seekForwardCommand


Both functions are enabled, but it doesn't make sense that both get called upon tapping the "next" button once.


I've linked bellow to an example project that demonstrates this issue.


https://github.com/gerbil802/MPRemoteCommandCenterProblem

Replies

What is the negative effect of it ?


But there may be some logic for the dual call:

Imagine you have a seek command to skip the first second of a track, (or whatever duration depending on content), or position to a first predefined point

- next TrackCommand first positions at the beginning of next track.

- then seekForwardCommand will jump to where you want to start any track.


So, it may be more a feature that you don't like than a bug.


You can disable seekForwardCommand. Or maybe don't do anything in seekForward if you are just at the beginning of track (coming from a next) ?