ModernAVPlayer
ModernAVPlayer copied to clipboard
MPRemoteCommandCenter/MPNowPlayingInfoCenter not working with default configuration
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 = []
// ....
}
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 ?
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.
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.
No worries at all! I don't think a reversal is necessarily required, but an explanatory comment in the docs could be nice 🙂
How will this be resolved?
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