Lysann Tranvouez
Lysann Tranvouez

Reputation: 946

Hide next/previous track controls on iOS

I am using AVPlayer to playback a continuous internet radio stream. I set up an AVAudioSession and my Info.plist to continue playback while the app is in background, and handle the remote control events to play, pause and stop.

On iOS there are controls for next and previous track in the multitasking bar, in the lock screen, on connected Bluetooth devices and so on. With these controls available and not "grayed out" the user assumes he could skip to another "track". But this is not possible in my scenario. There are no single "tracks". The app can only consume what is played by the icecast server.

Question: Is it possible to hide or disable these controls, so the user understands that it is not possible to skip to another "track"? (And if yes, how?)

Upvotes: 1

Views: 913

Answers (1)

matt
matt

Reputation: 535989

No. Just don't respond to those controls. Respond only to the controls you do respond to (e.g. playpause button).

In this example from one of my apps:

enter image description here

The "next" and "previous" buttons do nothing; they are meaningless. But I've never gotten a complaint from a user.

Upvotes: 1

Related Questions