SRGSSR / srgletterbox-apple

The official SRG SSR media playback experience
https://srgssr.github.io/marketing/letterbox/
MIT License
14 stars 7 forks source link

DRM-specific messages and support link #162

Open defagos opened 5 years ago

defagos commented 5 years ago

One of our stories asked us to display a DRM-specific error message in Letterbox, letting the user access more information in Safari by tapping on a dedicated button.

This story was implemented but could not work because DRM errors are not correctly forwarded from the resource loader delegate to AVPlayer, and thus to SRGMediaPlayerController, because of an AVFoundation bug.

Once this issue has been fixed, and if this still makes sense, we can implement the desired message. What remains to be done:

defagos commented 2 years ago

We probably weren't lucky when we first investigated this need, as having non-zero integer error codes in Objective-C, or integer non-zero enum values in Swift, allows the errors to be better propagated. Note that the error message itself seems to be correctly propagated since iOS 15, though the code is correctly propagated on iOS 14. I didn't test earlier versions.