How do I setup an MPErrorDomain listener

I'm trying to understand how to handle errors and we had someone do some work to do this on the AVPlayer but the way that is handled on AVPlayer is different, from what I can see in the documentation, than how errors are handled on the Media Player.


There is something called an MPErrorDomain which is a type of ErrorDomain.

https://developer.apple.com/documentation/mediaplayer/mperrordomain?language=objc

Do I create an observer to listen for when this type of error object occurs?


I am really just looking to understand how to process when one of these errors occur

https://developer.apple.com/documentation/mediaplayer/mperrorcode?language=objc