In my app I have enabled the background audio in order for the user to play,pause, skip tracks from lock-screen.
Everything works however, I cannot find the way to show the next track
and previous track
buttons.
Right Now the `MediaPlayer' is showing different buttons(see image Attached)
in my AppDelegate.swift
I have:
override func remoteControlReceivedWithEvent(event: UIEvent?) {
if event!.type == UIEventType.RemoteControl {
if event!.subtype == UIEventSubtype.RemoteControlPlay {
print("received remote play")
} else if event!.subtype == UIEventSubtype.RemoteControlPause {
print("received remote pause")
} else if event!.subtype == UIEventSubtype.RemoteControlTogglePlayPause {
print("received toggle")
}else if event!.subtype == UIEventSubtype.RemoteControlNextTrack{
print("received next")
}
}
How can I change the buttons in order to show next and previous buttons?