-
-
Notifications
You must be signed in to change notification settings - Fork 271
ios controls persist after calling MusicControl.stopControl
#376
Comments
I dug quite bit into the code and RCT_EXPORT_METHOD(resetNowPlaying)
{
MPNowPlayingInfoCenter *center = [MPNowPlayingInfoCenter defaultCenter];
center.nowPlayingInfo = nil;
self.artworkUrl = nil;
} appears to be working as intended. https://developer.apple.com/documentation/mediaplayer/mpnowplayinginfocenter/1615903-nowplayinginfo |
So in the end the answer was hidden in a somewhat cryptic post from 2018: You have to change the state of the controls to MusicControl.updatePlayback({
state: MusicControl.STATE_STOPPED,
elapsedTime: 0,
});
MusicControl.stopControl(); |
Hmm even when setting it's state (literally copy/paste yours) I can't get it to hide the controls 🤔 |
@leightonkuchel How did you go with this? Is this an iOS issue? or related to our package here? |
didn't work :( |
Description
I'm calling
MusicControl.stopControl()
on the clean up fuction ofuseEffect
:but the player persists after this call.
Before the callback:
after the callback:
Platform ?
The text was updated successfully, but these errors were encountered: