can't Airplay offline HLS content

I've recently added in the ability to allow for offline playback of my Fairplay enabled videos.


It works great. I can view my offline video on my iPhone just fine. I'm persisting my content key locally, and am able to use it to playback my video.


If I *don't* download my video - just stream it normally, I can play that video on my AppleTV with Airplay. All good.


Where this breaks is when I'm trying to play back Offline FPS content using Airplay. It plays just fine on my phone, but as soon as I turn on Airplay, playback stops immediately.


My AVAssetResourceLoaderDelegate gets called, and I can see that I'm returing the same data (my persisted content-key data stored on my phone), the same as I do when I'm just playing the video on my phone. But playback halts.


So, in short, I can do this:

- Airplay streamed FPS content to AppleTV

- Download that same FPS content and watch it on my phone. - by persisting content-key data about that video.

But I can't

- Airplay my downloaded, offline, FPS content. That immediately fails.

You are unable to use AirPlay to play downloaded FairPlay-protected content. I do not remember exactly where in the documentation I saw this, but Apple's reasoning was something along the lines of "AirPlay is inherently a online activity".

In the Offline Playback with FairPlay Streaming document it says: "AirPlay from iOS devices sends video to an Apple TV for viewing. Since Apple TVs are inherently online devices, a network connection is required to AirPlay downloaded HLS assets to an Apple TV."


This is not my area of expertise, but I have been told that the the persisted key will *not* work on the Apple TV. It has a form that tvOS does not understand.

My understanding is that your AVAssetResourceLoaderDelegate should get a new non-persistent key for the asset and pass that to the Apple TV.


You should probably ask further questions in the Fairplay Streaming area.

Hi guys can anyone tell me whether airplaying offline content is doable or not?
can't Airplay offline HLS content
 
 
Q