I notice this property hasProtectedContent
in the AVAsset
which is very vaguely defined.
Assets containing protected content may not be playable without successful authorization, even if the value of the
playable
property is YES. [doc]
Can someone elaborate what is protected content property means and when it will be true
? Is it always required (or good practice) to check for this value before attempting to play the video?
I am not sure what it means for third party sources, but this property is used to detect whether an asset is DRM protected or not. In my case, I use it to check if a chosen song from user's music library is DRM protected or not as the songs from Apple Music (subscription) are DRM protected.
hasProtectedContent
istrue
for such songs andfalse
for the ones which are DRM-free. Such DRM-protected songs cannot be played byAVPlayer
and only byMPMusicPlayer
.If you are interested in detecting whether an asset is DRM protected or in playing such assets the right way, you can read my detailed answer here: https://stackoverflow.com/a/47694472/4331787