Questions tagged [mpremotecommandcenter]

An Apple SDK Media Player object that responds to remote control events sent by external accessories and system controls.

74 questions
0
votes
1 answer

Lockscreen Widget Doesn't Dissappear After Finish Playing Video

I'm working on an app like Netflix, while the user watching a video, he can lock the screen and see the lock screen controller with the video content. ISSUE 1 When the app goes back to foreground, the user exits the player, locks the screen again…
Vadim F.
  • 881
  • 9
  • 21
0
votes
0 answers

MPRemoteCommandCenter play/pause command not updating properly

I have set play/pause button enabled and also added target event to each but when ever I click button in simulator it always calls play button's target event and button's image not properly updating from play to pause and vice versa. Any one have…
Divyesh
  • 2,085
  • 20
  • 35
0
votes
1 answer

MPRemoteCommandCenter Not displaying in lock screen

May be it's a duplicate question, but none of the solutions working for me. I have tried out almost everything. The now playing info is not getting updated in lock screen. Swift Version : 5 & iOS Version : 13 Here is my code func…
kalpa
  • 884
  • 1
  • 15
  • 22
0
votes
1 answer

How to remove MPRemoteCommandCenter from Notification Center

How to remove MPRemoteCommandCenter.shared() from Notification Center. I tried this code, but only commands and actions are disabling. I need complete notification to be removed from the Notification Center. When we kill app it doesn't appear in…
Harsha
  • 760
  • 1
  • 7
  • 21
0
votes
0 answers

Lock Screen play/pause controls not changing

I would like to change play/pause button icon on a lock screen when I tap play/pause in the app. When I tap play/pause from a lock screen, I receive it in the app and update the view, but when I tap it in the app, it doesn't update on a lock…
0
votes
1 answer

MPRemoteCommandCenter play/pause Flashing when touched

i'm working on music player app that written in Swift, audio streams with AVPlayer and everything is fine but when i tried to add MPRemoteCommandCenter to my app there was a lot of bug that i dont know even why this happend link to video that…
Mohammad Reza Koohkan
  • 1,656
  • 1
  • 16
  • 36
0
votes
2 answers

Swift: Remote Command Center not show in lockScreen

Iam trying to show command center in lock screen and not woking for me, i see the code from this tutorial, and write the same code but also not working https://github.com/lukagabric/LGAudioPlayerLockScreen this is the code var nowPlayingInfo =…
Yusef.Naser
  • 123
  • 1
  • 6
0
votes
3 answers

How to set the playback time from MPRemoteCommandEvent?

I have code callback: commandCenter.changePlaybackPositionCommand.addTarget { (event) -> MPRemoteCommandHandlerStatus in self.player.currentTime = ??? self.setupNowPlaying(img: self.image) return .success } and it gets…
Tob
  • 985
  • 1
  • 10
  • 26
0
votes
1 answer

how to display "live" in the control center (swift iOS)

Apple Music displays "live" inside the control center, if you hear Beats 1. Is there any way to display this "live" label and hide the normal audio progress slider?
WalterBeiter
  • 2,021
  • 3
  • 23
  • 48
0
votes
1 answer

Detect end of playback on lock screen - AVPlayer

I've the array of audio file and would like to play them consecutively. Is there any way to detect when AVPlayer ending playing on lock screen so that I could call a completion handler and play next sound? I want to call nextPlayAudio() from my…
0
votes
1 answer

MPRemoteCommandCenter SomeTimes doesn't show up

I have a music player that uses Superpowered as an audio player. I followed this article to implement a player widget. However, the widget sometimes shows up and many times doesn't. I want the player widget to show up whenever there is audio…
0
votes
0 answers

Can you launch non-mixable audio while in background and use the remote control center?

I am initiating some background music from a local notification. I am getting the following error code: Error Domain=NSOSStatusErrorDomain Code=560557684 "(null)", which is AVAudioSessionErrorCodeCannotInterruptOthers An attempt was made to make…
RMoore
  • 183
  • 1
  • 2
  • 9
0
votes
1 answer

Updating Target Action Method of Player remote control events (MPRemoteCommand)

I have created application with two different audio players (Radio and MP3). Using MPRemoteCommandCenter for both players for managing players from lock screen. Here is the code snippet: MP3 Player let commandCenter = MPRemoteCommandCenter.shared() …
A J
  • 605
  • 4
  • 16
0
votes
1 answer

MPRemoteCommandCenter does not work with Bluetooth Handsfree

I want to receive remote control events from Bluetooth Handsfree device, Below mentioned is my set of code for play and pause events. MPRemoteCommandCenter.shared().nextTrackCommand.isEnabled =…
Jas_meet
  • 366
  • 1
  • 20
1 2 3 4
5