ModernAVPlayer icon indicating copy to clipboard operation
ModernAVPlayer copied to clipboard

MPRemoteCommandCenter/MPNowPlayingInfoCenter not working with default configuration

Open pimms opened this issue 4 years ago • 6 comments

Thanks for a great framework! It has saved me for a lot of hassle in dealing with AVPlayer 👍👍

When using ModernAVPlayerConfiguration, the MPRemoteCommandCenter seems to never show for the configured ModernAVPlayer. One have to create a custom implementation of PlayerConfiguration and override the audioSessionCategoryOptions to get it to appear.

This was broken in 1.7.3, and is not an issue in 1.7.2.

// Example:
struct CustomPlayerConfiguration: PlayerConfiguration {
    let audioSessionCategoryOptions: AVAudioSession.CategoryOptions = []

    // ....
}

pimms avatar Nov 28 '20 12:11 pimms

Hi @pimms,

thanks for your message !

I have a dilemma:

  • This player was created to be resilient about network issue
  • From 1.5.2 this player is not resilient anymore if mixWithOther options is not set (AVPlayer and co... api changed 🤯)
  • but I really understand mixWithOther is not a good options for primary audio playback app situation.

You're right about MPRemoteCommandCenter, I think I have to revert changes and do not set mixWithOther -and set aside network resilient until I found something appropriate...

What's your opinion as a user ?

raphrel avatar Nov 29 '20 09:11 raphrel

How does this affect network resiliency? As a user, I'd expect the remote command center to appear "out of the box" — it took me some time to figure out what was going wrong.

pimms avatar Nov 29 '20 13:11 pimms

Network resiliency not working (from 1.5.2 version) if avaudio session options not set to .mixWithOthers...

I completely understand about command center. I will revert changes. sorry for incovenience.

raphrel avatar Nov 30 '20 00:11 raphrel

No worries at all! I don't think a reversal is necessarily required, but an explanatory comment in the docs could be nice 🙂

pimms avatar Nov 30 '20 16:11 pimms

How will this be resolved?

yunustek avatar Jan 04 '21 01:01 yunustek

Don't know yet, I had not so much time to work on it.. but any help is appreciated In the meantime, I revert default avaudiosession category (on develop branch) to get back with working remote controller by default

raphrel avatar Jan 07 '21 22:01 raphrel