It is possible to hide or disable any of the player actions in the control center on the lock screen.
If you want to keep the icon, but leave it in the disabled state, you need to explicitly disable the command, as well as set an action to it.
commandCenter.previousTrackCommand.enabled = NO;
[commandCenter.previousTrackCommand addTarget:self action:@selector(previousTapped:)]; // or some dummy selector, this will never be called
commandCenter.nextTrackCommand.enabled = NO;
[commandCenter.nextTrackCommand addTarget:self action:@selector(nextTapped:)]; // or some dummy selector, this will never be called
If you do not want the button to appear at all, don't set the the command to be enabled, or set its action.
To set the Pause command, enable it and set an action:
commandCenter.pauseCommand.enabled = YES;
[commandCenter.pauseCommand addTarget:self action:@selector(pauseAudio)];
You can then implement a pauseAudio
method which pauses or stops your player.