Does FairPlay support playback_duration in addition to rental_duration?

I would like to limit offline playback such that after the user starts playing content, they have a limit like 24 hours to complete watching the video. They should have up to like 60 days to start watching the video.


I've seen these terms used in the industry as rental_duration = 60 days and playback_duration=24 hours.


I see in the documentation the rental_duration is supported in fairplay. However, I do not see playback_duration. Is playback_duration supported in fairplay? Or is that something I have to implement in my application?

Replies

It's supported from iOS 11. See Offline Rental Support in the FairPlay Streaming guide. The example given there is exactly what you're asking for:


Example: A user rents a movie; the server sets the storage duration to 2,592,000 (30 days) and the playback duration to 86,400 (24 hours). The user has up to 30 days to start watching the movie and 24 hours to finish watching it after starting the playback. If the app requests a Sync SPC to be created prior to user starting playback, the “Duration to expiry” field of the Sync TLLV will be set to 2,592,000 minus the number of seconds passed since license was downloaded. The same SPC requested after playback has started will contain a Sync TLLV with the “Duration to expiry” field set to 86,400 minus the number of seconds since playback was started.


Noam.

Noam

can you provide link to FairPlay Streaming guide where I can find informations about Offline Rental Support? When I was googling for rental duration and playback duration I didn't find anything that clearly explain how to get this in code. I would like present to my app users how much time they have after download to watch movie or after first playback, how much time left to end watching movie or watch it again.

Go to this page:

https://developer.apple.com/streaming/fps/

And download FairPlay Streaming Server SDK.


Inside this zip there's a programming guide (PDF).


Note that as mentioned in other threads here, you have to communicate and manage the expiration timers yourself, there's no API to get them.

Thank you Noam

I started wondering if it possible to read somehow Lease Duration and Rental Duration directly from Content key duration TLLV after download them? I am looking for the way how to handle this without changing my API

It's not possible, please see following threads:

https://forums.developer.apple.com/thread/104260

https://forums.developer.apple.com/thread/99970