Post

Replies

Boosts

Views

Activity

Reply to MPRemoteCommands not emitting events on tvOS 14
When I posted my original question, I thought I was stumped on finding a solution. Of course, only after posting my question did I have a hunch that this was due to the introduction of MPNowPlayingSession. It turns out that's the issue. On tvOS 14 -- at least in the current beta -- it seems that using the MPRemoteCommandCenter sharedCommandCenter doesn't work. Instead, you must: initialize a MPNowPlayingSession, passing in your AVPlayer instance make the session active via becomeActiveIfPossibleWithCompletion use the remoteCommandCenter property of the session, instead of MPRemoteCommandCenter sharedCommandCenter And of course, once you have created a MPNowPlayingSession, you need to use that session nowPlayingInfoCenter property to publish now playing info instead of MPNowPlayingInfoCenter defaultCenter. I will file a bug report about this, as I believe MPRemoteCommandCenter sharedCommandCenter should continue to work on tvOS 14, and the docs do not indicate that it is deprecated.
Aug ’20